From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Homography mapping calculation (Labview code)

Klemen
Active Participant

Hello,

I am posting Labview code to calculate the perspective projective mapping between two planes (homography), assuming that locations of at least 4 corresponding points are known. This can be used for pixel-to-real world mapping by eliminating perspective distortion, after which the measurements of a real world object can be performed. For example, the previous post describes the practical application of this (https://decibel.ni.com/content/blogs/kl3m3n/2015/03/13/optical-water-level-measurements-with-automat...).

Or you can just do some cool stuff like this :

destination_resized.png

base image

Koala_resized.jpgPenguins_resized.jpg

images of koala and penguins (obviously ).

final.png

final image (koala and penguins subjected to perspective distortion and inserted into both base image frames).

I am attaching the Labview program to calculate the homography and perform a simple check of the result. The calculated homography can then be used for example to map the pixel-to-real world or pixel-to-pixel coordinates.

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."
Comments