Calculate Corrected Pixel Position Using Polynomial Distortion Model

Updated Apr 18, 2018

Reported In


  • Vision Development Module

Issue Details

I have used the IMAQ Learn Camera Model and IMAQ Correction Learn Setup functions to learn my camera's distortion model. How can I calculate the corrected pixel position of an arbitrary pixel?


The NI Vision Concepts Help manual describes how to calculate the corrected pixel position under Vision Basics > Spacial Calibration > In-Depth Discussion. The equation to correct for radial distortion is given as the following:

In this equation, x and y are the pixel positions for the point of interest and K values are the radial coefficients which can be found from the IMAQ Get Camera Parameters function. The variable r is defined as:

Where x and y are the x and y distance from the point of interest to the optical center and fx and fy are the focal lengths in each direction.


Not Helpful