Re:Show HN: Swapping Position and Brightness in Grayscale Im...
by no_gravity on Wednesday December 20, 2017 @05:31AM
(#15968483)
Correct! In fact, I already use a poor mans average. Initially newImage is all black and then:
b=oldImage[x,y];
xa=(newImage[b,y]+x)/2; // poor mans average
newImage[b,y]=xa;
Would a proper average improve the image further?Let's see...
...here we go: No average on the left, poor mans average in the middle, proper average on the right:
https://www.productchart.com/elements/objects/blog/2017-12-1...
Yup, it's better. I updated the page with the proper average algorithm now.
Thanks, Brian!
Re:Show HN: Swapping Position and Brightness in Grayscale Im...
by brian-armstrong on Wednesday December 20, 2017 @03:52PM
(#15973701)
Awesome! The background gradient bar seems reasonable now, you can see that it's about hakf brightness which makes more sense to me :)
I wonder if rather than using max, if you averaged instead. Would you get more of an idea of right/left of how that brightness is distributed?