0

I am using Imagemagick to distort the full image, but I have some problem with determination of distorted position of the single point from original image.

I am working with Barrel Inverse distortion right now and from Imagemagick documentation I see that distorted position is determined with the following equation:

Barrel Inverse Formula

What I want to achieve: given pair of original image coordinates (Xsrc, Ysrc) and the set of Barrel Inverse distortion coefficients (A, B, C, D) determine pair of coordinates for target image (Xtgt, Ytgt).

From the equation above I can't tell the correct way to implement mapping.

  • Can you upload your image as well and provide values for X, Y (src) and A,B,C,D. Also, do you need mapping of a specific location or just corrected image. As per https://legacy.imagemagick.org/Usage/lens/#non-scaling correction can be done via `convert distorted_image.jpg -distort barrel "A B C" corrected_image.jpg` – saurabheights Jul 10 '23 at 19:30
  • You need the inverse transform, which is not easily done. – fmw42 Jul 10 '23 at 19:43

0 Answers0