1
$\begingroup$

Why are images transformed by ImageTransformation always a better quality than by ImageForwardTransformation?

Is it a bug or is it because of different mathematical procedures they use?

I tested many different functions and it is always that ImageTransformation is better.

Image 1 is original. Image 3 is better than image 2 and image 5 is better than image 4.

gr = Graphics[{Table[{If[i == 24 - j, Gray, Black], 
     Disk[{i, j}, 1/4]}, {i, 19}, {j, 13}], 
   Table[{If[i == 23 - j, Gray, Black], {RGBColor[RandomReal[1, {3}]],
       Disk[{i, j} + 1/2, 1/4]}}, {i, 18}, {j, 12}]}]
ImageForwardTransformation[gr, #^(1/2) &]
ImageTransformation[gr, #^2 &]
ImageForwardTransformation[gr, #^2 &]
ImageTransformation[gr, #^(1/2) &]

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ From the help for ImageForwardTransformation By default, transformed points are interpolated using Method -> "Interpolated" . Whereas the help for ImageTransformation says the Resampling option is Automatic by default, meaning it may be selecting a better method. You don't get much control over the interpolation method of ImageForwardTransformation - it's either Automatic or None, so just stuck with ImageTransformation for better results. $\endgroup$
    – flinty
    Commented Apr 23 at 12:47
  • $\begingroup$ Sometimes it is easier to define a function for ImageForwardTransformation than for ImageTransformation since it is not always possible to have an inverse function. Also the differences in Method between the two has no sense to me. $\endgroup$ Commented Apr 23 at 13:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.