Re: How to perform logarithmic distortion on one axis
Posted: 2012-08-22T22:20:30-07:00
Interpolation works but only for compressions of less than 50% more than that and you will get aliases.
Rather than interpolating, I would figure out what range of pixels needs to be compressed into a single pixel, then resample those to produce the right colored pixel. An simple average of all the pixels to be compressed will be better than a direct interpolated lookup, even if the 'weightings' should also be some type of logirithmic scaling.
Basically it comes down to how much work do you want to get the accuracy that is accaptable.
The Distortion page (start at the top) goes though the basic steps that is followed to get more accurate color results.
http://www.imagemagick.org/Usage/distorts/
Rather than interpolating, I would figure out what range of pixels needs to be compressed into a single pixel, then resample those to produce the right colored pixel. An simple average of all the pixels to be compressed will be better than a direct interpolated lookup, even if the 'weightings' should also be some type of logirithmic scaling.
Basically it comes down to how much work do you want to get the accuracy that is accaptable.
The Distortion page (start at the top) goes though the basic steps that is followed to get more accurate color results.
http://www.imagemagick.org/Usage/distorts/