imaqFindCircles

NI Vision for LabWindows/CVI Function

imaqFindCircles

Usage

CircleReport* imaqFindCircles(Image* dest, Image* source, float minRadius, float maxRadius, int* numCircles);

Purpose

Separates overlapping circular objects and classifies them depending on their radii. This function also draws the detected circles into the destination image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

dest Image* On return, an image containing circles that the function located.
source Image* The image in which the function finds circles.
minRadius float The smallest radius (in pixels) to be detected. Circles with radii smaller than this value do not appear in the destination image or the returned report array.
maxRadius float The largest radius (in pixels) to be detected. Circles with radii larger than this value do not appear in the destination image or the returned report array.
numCircles int* On return, the number of circles that the function detected in the image. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

CircleReport* On success, this function returns an array of structures containing information about each of the found circles. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose().

Parameter Discussion

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.