I have been trying to control how the pixels are interpolated with distort perspective as follows:
...-interpolate nearest -distort Perspective ...
I am referring to this: http://www.imagemagick.org/Usage/misc/#interpolate
There is absolutely no difference in result with "nearest", however other method like "Average16" the difference is visible. Is it possible to apply nearest interpolation to perspective?
Basically I am trying to achieve a distort that is NOT anti-aliased.
Any help is appreciated!
Nearest Neighbor Interpolation with Perspective
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Nearest Neighbor Interpolation with Perspective
try-interpolate nearest -distort Perspective
Code: Select all
-interpolate nearestneighbor -filter point -distort Perspective
I am not sure what "nearest" does. It is not listed for -interpolate on the options page at http://www.imagemagick.org/script/comma ... nterpolate. I wonder if that is a typo for convert -list interpolate?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Nearest Neighbor Interpolation with Perspective
-interpolation in distort only happens when...
http://www.imagemagick.org/Usage/misc/#nearest-neighbor
It is a good interpolation to use when you want to be sure you get exact colors when the lookup point many not be absolutely exact, perhaps due to floating point. However No-Op distorts should not have that problem, though it recommends it as a precaution even though it is not needed.
http://www.imagemagick.org/Usage/distort/#distort_noop
- You turn off "Scaled Area Resampling" specifically EWA sampling.
http://www.imagemagick.org/Usage/distor ... nterpolate - The EWA sampling fails to hit any pixel at all. That generally ONLY can happen because you played with expert filter settings,
and made the filters 'support window' or elliptical area so small it could not even find a single pixel in the area to sample. That is you really stuffed things up.
http://www.imagemagick.org/Usage/distor ... rt_failure
http://www.imagemagick.org/Usage/misc/#nearest-neighbor
It is a good interpolation to use when you want to be sure you get exact colors when the lookup point many not be absolutely exact, perhaps due to floating point. However No-Op distorts should not have that problem, though it recommends it as a precaution even though it is not needed.
http://www.imagemagick.org/Usage/distort/#distort_noop
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Nearest Neighbor Interpolation with Perspective
Thank you for your help.