This demonstration shows off some of the tools in the built-in OpenCV tool set. These tools have been implemented using the tool C API and the OpenCv integration API. The full source code of these tools is available in the VisionAppster SDK that comes with the installer.
Let us walk through a simple application that uses both VisionAppster and OpenCv tools. The application segments blobs from input image, calculates the distance transform which describes the "closest territory" of each blob. Finally, it finds the convex hull of the centroids of the blobs, creating "a perimeter fence" that encircles the set of blobs.
Binarize Tool is configured to produce a binary image which has zero pixels (black) inside and ones (white) outside of the blobs.
The binary image is passed to a tool which calls the distanceTransform OpenCv function.
DistanceTypeoptions can be selected from drop-down lists.
Color Distance Tool inverts the gray levels of the
Distanceoutput of the previous tool in order to improve the visual output. The brighter the pixel, the closer it is to a blob. Pixels inside the blobs are white.
The tools in the rightmost processing branch are:
Analyze Blob Geometry Tool inputs the labeled image from
Blob Detection Tool. The output of interest is
Centroidwhich contains coordinates of the centers of the blobs.
The coordinates are passed to a tool which calls the convexHull OpenCv function. It selects the centroids that are on the outer perimeters of the set of points. The perimeter points are listed either clockwise or counter-clockwise, depending on the value of the
The colorful display with the title
Multiple parameters shows the
Labels output of the
Distance Transform tool. The color map of the image display has been set to
Light Colors. The output of the
Level Thresholding tool has been overlaid with the labeled image. Also the
Centroid output of
Blob Geometry Analysis has been dragged and dropped on the image. The coordinates are shown as connected points.