How Does the IMAQ Centroid VI Work?

Updated Apr 24, 2023

Reported In


  • Vision Development Module

Issue Details

The IMAQ Centroid VI computes the center of energy of an image. What exactly does that mean and how does that work?


The IMAQ Centroid VI finds the center of energy of an image through a standard centroid equation:

X=Sum(X*Pixel Values)/Sum(Pixel Values), Y=Sum(Y*Pixel Values)/Sum(Pixel Values)

where X and Y represent a pixel's coordinates and a Pixel Value is the numerical value of each pixel. For an eight bit pixel, the Pixel Value can range from 0 to 255, where 0 is a black pixel with no energy and 255 is a white pixel with the most energy.