Class BlobTrace

The class BlobTrace provides a tool for extracting boundary points of a blob and computing statistics of the boundary points. This tool is used for shape recognition based on object silhouettes.

Description: The boundary points of a blob (also denoted as a blob trace) are extracted by searching for 8-connected pixels that separate a pixel of selected label from pixels of other labels. The blob is defined in this case as any connected region of the same label (color). The blob label does not have to be unique in the image which is different from processing a labeled connected component of an image.
Statistics of a trace include mean, standard deviation, variance, covariance, correlation, elongation, slope, orientation, spread and perimeter. These parameters of a trace can be used for inferring shape of a 2D object or a 3D object from a constrained class of 3D objects.

This tool can be also used for overlaying various images with a trace stored in a file. Any trace can be loaded to a tool and shown as an overlay in the current image frame.


Run: The interface to the tool (shown below) allows to select a blob (label and starting point of a trace) by left mouse clicking on the desired image location followed by clicking the "InitTrace" button in the BlobTrace Dialog. The starting point of a trace will be shown as a red cross in the image frame. The text area of the BlobTrace Dialog will show the coordinates of a starting point and a label of the blob.


The trace is extracted by clicking the "Find" button and displayed as an overlay in the image frame by hitting the "Show" button. The displayed color of trace can be modified by opening a color selection Dialog with the "OutColor" button. The extracted trace can be saved in a file by clicking the "SaveTrace" button. The maximum number of trace points can be set in the edit box denoted as "MaxPts" and the true number of trace points is shown in the text area under the "Results" label. The number of trace points cannot be larger than the maximum number of points set in the edit box.
The label that was selected by a user defines the "internal" pixels and the trace will contain boundary points "outside" of the pixels with a selected label. The trace will contain the "internal" pixels only if the trace should go beyond the image size, e.g., a blob is touching one of the image sides.


Statistics of a trace are computed by clicking the "Stats" button. The computed parameters include mean, standard deviation, variance, covariance, correlation, elongation, slope, orientation, spread and perimeter. All parameters are shown in the text area called "Results" and can be also saved in a file by hitting the "SaveStats" button.

An old trace can be loaded by clicking the "LoadTrace" button. The loaded trace can be displayed by hitting the "Show" button and overlaid on the current image. Statistics of the loaded trace can be computed via the "Stats" button followed by the "ShowStats" button.


The BlobTrace dialog is closed with the "Done" button.