 thierry77
		
			thierry77
		
		
		
		
		
		
		
		
	
			11-15-2012 10:03 AM
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
 KevinC
		
			KevinC
		
		
		
		
		
		
		
		
	
			11-16-2012 10:50 AM
You should look at the calibration functions. An affine transform is a subset of the perspective transform that the calibration functions provide.
Kevin
11-23-2012 03:01 AM
Thanks for your answer.
I actually manage to implement in labview the transformation affine and the estimation of its matrix, once I really understand the bilinear interpolation
 AlexanderKhodar
		
			AlexanderKhodar11-29-2012 07:01 PM
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
 ilanm
		
			ilanm
		
		
		
		
		
		
		
		
	
			06-10-2015 04:12 AM
Do you have a VI fo the affine tranformation? for 3 points?
 
					
				
		
 alexderjuengere
		
			alexderjuengere
		
		
		
		
		
		
		
		
	
			06-19-2015 10:08 AM
@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
 Klemen
		
			Klemen
		
		
		
		
		
		
		
		
	
			06-22-2015 04:48 AM
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
 Klemen
		
			Klemen
		
		
		
		
		
		
		
		
	
			06-23-2015 02:15 AM
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
 Dr._David
		
			Dr._David
		
		
		
		
		
		
		
		
	
			06-02-2020 01:51 AM
Exactly what I was looking for. Thank you!