GregAlt / SolarFinish

App to apply finishing touches to solar images
MIT License
5 stars 3 forks source link

Bug/Enhanacement request - bright red line when image rotated #5

Open flyingbarron opened 8 months ago

flyingbarron commented 8 months ago

Hi Greg,

When I rotate the image, there is often a bright red line at the cropping edge. See lower left in the image below.

I assume this is due to some light leak at the sensor (Meade LPI-G Advanced mono akak IMX178 mono)

Still, if it could be erased, that would be nice :)

image

GregAlt commented 8 months ago

Yeah - I generally want to revisit the rotation code. It necessarily creates new pixels, and the functions give some options for how to fill them, but none of the options are particularly good in our case. If you give a source image and command line parameters that repro this case, that would be helpful. I think a couple things might be the cause here one might be just a sharp discontinuity from very dark to absolute black at that edge where it fills in pixels. Then later, just as it brightens the proms, it brightens those pixels. Other thought is maybe the rotation is just getting stray bright pixels along the edge - I think I've seen something like that. Probably makes sense to just erase a 2 pixel boundary around the rotated rectangle regardless, and then do some blurring across some more pixels to remove discontinuities.

That's separate from dealing with brighter/bigger glows where having a black triangle is jarring and it should try to smoothly continue the gradient closer to the sun - but should still fade towards black radially. But I think your single-pixel line is a simpler problem.