imaqConvexHull
Usage
int imaqConvexHull(Image* dest, Image* source, int connectivity8);
Purpose
Computes the convex envelope for each labeled particle in the source image. If the source image contains more than one particle, you must label each particle with imaqLabel2() before calling this function.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | Image* | The image containing the labeled particles that the function calculates convex envelopes for. |
connectivity8 | int | Set this parameter to TRUE to use connectivity-8 to determine whether particles are touching. Set this parameter to FALSE to use connectivity-4 to determine whether particles are touching. For more information about connectivity, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |
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.