Show HN: Swapping Position and Brightness in Grayscale Images
productchart.com
productchart.com
https://support.apple.com/kb/PH12688?locale=en_US&viewlocale...
Swapping x with brightness is a bit misleading as dithering effect of white dots on black background give much stronger feeling of varied brightness than actual brightness.
Some digital cameras have this as an overlay on the LCD. If you have a Canon EOS you can always get this feature via the really cool Magic Lantern open-source firmware.
Also, re: some comments calling it a histogram here: maybe colloquially (though I've never heard it), but generally it's called a waveform monitor.
I did this manually with the seagull photo, and some pretty interesting results occur. The seagull becomes increasingly compressed towards the left, and looks more like a seagull on even iterations than on odd iterations.
Just goes to show how entertaining a simple algorithm can be, nice work!
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?
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!