I need the borders between two color regions to not be interpolated at all. If the source image goes from #00FF00 to #FF0000, then I want the warped image to also have that same transition (though at a different pixel location. I'm also using virtual-pixel Black to ensure that the edges of the warped image stay black.
Code: Select all
convert IN_FILE -virtual-pixel Black -interpolate NearestNeighbor -distort polynomial "2 $(cat control_points.txt)" OUT_FILE
How do I apply a distortion without any interpolation, and retain 'hard' edges of the same color boundary in the source image?