Skip to content

Vectorization

This example shows how to use vectorization capabilities in order to perform the same operation on multiple instance of the same input type. Tool's properties can in fact accept an input of a specific type or an array of that type; in this case the output is computed for each value in the input array. For example a tool like Region.GetArea can work on an array of Region to compute an array of integer values representing the area of each instance.

In the example, Region.ExtractBlobs is used to extract the blobs in the input image. The output Array< Region > is connected to Region.GetBoundingCircle to locate the blob center.

From the reference circle, two CircleFittingField are created to compute the object's best inner and outter circle.

Vec

By loading different images with different number of objects the entire operation is repeated for each blob instance without using any additional loop, the iterations are automatically performed; in the case of three objects, three blobs are found in the image, which cause the creation of three reference circle and so on.

Vec

Vec