Module that uses the data from the lumaChroma module to extract blobs that are available.
Module that uses the data from the lumaChroma module to extract blobs that are available.
Blob Extractor application.
Description
This module is responsible for extracting all the blobs based upon the lumaChroma module. To this end, it receives an image input from the lumaChroma and acts upon it to retreive the blobs and their moments (orientation and principal axes)
The commands sent as bottles to the module port /<modName>/rpc are the following:
(notation: [.] identifies a vocab, <.> specifies a double, "." specifies a string)
THRESH
format: [thresh] <10.0>
action: Applies a fixed-level threshold to each array element, defaults 10.0 (input array is the image). reply: ok
ERODE
format: [erode] <8.0>
action: Erodes an image by using a specific structuring element, defaults 8.0. reply: ok
DILATE
format: [dilate] <3.0>
action: Dilates an image by using a specific structuring element., defaults 3.0. reply: ok
Libraries
Ports Created
- / <modName>/img:i receives the image acquired from the lumaChroma module previously specified through the command-line parameters.
- / <modName>/img:o streams out the binary images displaying all blobs.
- / <modName>/propImg:o streams out the camera image propagated for synchronisation.
- / <modName>/blobs:o streams out a yarp list containing all the blobs information, such as bounding box and moments if selected.
- / <modName>/binary:o streams out a cleaned binary image containing only blobs detected (without noise).
Parameters
–name name
- specify the module stem-name, which is blobExtractor by default. The stem-name is used as prefix for all open ports.
–thresh value
- specify the threshold value. Applies a fixed-level threshold to each array element. The default value is 10.0.
–erode_itr value
- specify the erode value. Erodes an image by using a specific structuring element. The default value is 8.0.
–dilate_itr value
- specify the dilate value. Dilates an image by using a specific structuring element. The default value is 3.0.
–gaussian_winsize value
- specify the gaussian winsize value for the smoothing of the image. The default value is 9.0.
–window_ratio value
- specify the window_ratio value. The default value is 0.6.
–details string
- specify the details option. If set to on it provides information on the orientation and principal axes for each blob sent to the /<modName>/blobs:o port. The default value is off.
–maxHeight value
- specify the maxHeight value. This sets the value for the max height of the blob extraction. The default value is 150.
–maxWidth value
- specify the maxWidth value. This sets the value for the max width of the blob extraction. The default value is 150.
Tested OS
Windows, Linux, Mac OS
- Author
- Vadim Tikhanoff