3 ms·
This is a crazy transform to wrap your head around. Given the impl, I think I would restate it as B'(x,y) = ARGMAX(B(u,y)=x, u) -- that is, the brightness at x,
by brian-armstrong 9y ago
This is a crazy transform to wrap your head around. Given the impl, I think I would restate it as B'(x,y) = ARGMAX(B(u,y)=x, u) -- that is, the brightness at x,y in the new image is the max value of u for which the brightness at u,y is x in the old image.
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?
- no_gravity 9y agoCorrect! 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-19-images/averages.jpg 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!
- brian-armstrong 9y agoAwesome! The background gradient bar seems reasonable now, you can see that it's about hakf brightness which makes more sense to me :)