Machine Vision

cancel
Showing results for
Did you mean:

Affine Transformation on image

I want to apply a affine transformation on a image. I know some (at least 3) points on the current image and the same points on the "new image" (after the affine transformation).

I can not use the function from matlab or opencv to perform the geometric operation and only find basic operation like rotation or translation in the vision module

Message 1 of 9
(4,032 Views)

Re: Affine Transformation on image

You should look at the calibration functions. An affine transform is a subset of the perspective transform that the calibration functions provide.

Kevin

Message 2 of 9
(4,015 Views)

Re : Affine Transformation on image

I actually manage to implement in labview the transformation affine and the estimation of its matrix, once I really understand the bilinear interpolation

Message 3 of 9
(3,983 Views)

Re : Affine Transformation on image

Sometimes it is easier to work with image in the form of 2D array (especially if you are working with grayscale image).

In that case Functions>>Mathematics>>Geometry pallet should be exactly what you need.

www.xinstruments.com - Custom Software for Industrial Automation

www.hdrconverter.com - Picture processing made easy

Message 4 of 9
(3,954 Views)

Re : Affine Transformation on image

Do you have a VI fo the affine tranformation? for 3 points?

Message 5 of 9
(3,307 Views)

Re : Affine Transformation on image

@ilanm wrote:

Do you have a VI fo the affine tranformation? for 3 points?

Maybe kl3m3n posted something you're looking forward: https://decibel.ni.com/content/blogs/kl3m3n/2015/04/24/homography-mapping-calculation-labview-code

Message 6 of 9
(3,209 Views)

Re : Affine Transformation on image

Hello,

write the equation for affine transformation and solve it. You need 3 point pairs for this. If you have more points, you could use a least-squares approach.

If you don't like coding, you can use OpenCV's functions getAffineTransform() and estimateRigidTransform(), respectively. Just perform a .dll call - there are a lot of examples online.

Best regards,

K

https://decibel.ni.com/content/blogs/kl3m3n

"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 7 of 9
(3,174 Views)

Re : Affine Transformation on image

Hello,

to help you a bit further, here is an example of calculating the affine transformation (least square), provided you know the three corresponding point pairs.

Hope this helps.

Best regards,

K

https://decibel.ni.com/content/blogs/kl3m3n

"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 8 of 9
(3,157 Views)

Re: Re : Affine Transformation on image

Exactly what I was looking for.  Thank you!

Message 9 of 9
(461 Views)