frei0r icon indicating copy to clipboard operation
frei0r copied to clipboard

lenscorrection needs interpolation

Open pmjdebruijn opened this issue 5 years ago • 2 comments

Currently it seems the lenscorrection filter does not use any interpolation (or well, effectively nearest neighbor???). This leads to clearly visible stairstepping artifacts which is especially noticable on scenes with clear geometric shapes at the edge of the frame.

It would be nice to have a interpolation=bilinear or interpolation=lanczos2 option available

It would also be nice for the lenscorrection filter to be able to apply an automatic "zoom", so the input resolution = output resolution without any green border visible.

pmjdebruijn avatar Oct 13 '19 12:10 pmjdebruijn

Here you can see it was intended by its author but never completed: https://github.com/dyne/frei0r/blob/master/src/filter/lenscorrection/lenscorrection.c#L211

ddennedy avatar Oct 13 '19 18:10 ddennedy

Yeah I noticed that as well.

However, in the meantime I noticed defish0r too, which seems to be a good fit for my purposes, even though it technically doesn't support rectilinear lenses, it seemingly works well for mine.

defish0r also has choice of every common interpolator.

So adding proper rectilinear support to defish0r seems to make more sense now than adding interpolation to lenscorrection.

pmjdebruijn avatar Oct 13 '19 18:10 pmjdebruijn