Image-based Segmentation and Object Tracking
Main Sheet Configuration
- Required Modules
- CvfdWebcam
- LOOP0 (This appears after you create iterator sheet.)
CvfdWebcam
All description is available at Image I/O.
LOOP0
All description is available at Image I/O.
Iterator Sheet Configuration
- Required Modules
- CvfdQueryFrame
- CvfdhCondensation
- CvfdhDrawSrcRoi
- CvfdhShowImage
- CvfdhCameraSpecSetter
- CvfdhSrcInfoTracker
- CvfdhSrcInfoFormatConverter
- DisplayLocalization
CvfdQueryFrame
All description is available at Image I/O.
CvfdhCondensation
- Module Description
This module segments a specific colored object by particle filtering.
If you want to use other object segmentation, you can replace this module with a module in the following category.
Node list > FDOPENCV_HARK:Segmentation
- Module Location
Node list > FDOPENCV_HARK:Segmentation > CvfdhCondensation
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
N_PARTICLE | int | 4000 | Number of particles |
N_STATES | int | 4 | Order of states for each particle |
SRC_TYPE | string | COG | Definition of the output source |
ROI_SIZE | int | 20 | RoI size for each output source |
TARGET_COLOR | object | <Vector<float> 0 0 255> | Target color for segmentation in BGR values. |
SRC_TYPE is now COG, so the center of gravity of all particles is output.
TARGET_COLOR is important for the color detection.
CvfdhDrawSrcRoi
- Module Description
This module draws detected RoI windows on the input image stream with specific color and line width.
- Module Location
Node list > FDOPENCV_HARK:ROI > CvfdhDrawSrcRoi
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
WINDOW_COLOUR | object | <Vector<int> 0 0 0> | Color of RoI windows in RGB values |
WINDOW_THICKNESS | int | 1 | Line width of RoI windows |
CENTER_COLOUR | object | <Vector<int> 0 0 0> | Color of a RoI center dot in RGB values |
CENTER_THICKNESS | int | 1 | Line width of a RoI center dot |
CvfdhShowImage
All description is available at Image I/O.
CvfdhCameraSpecSetter
- Module Description
This module defines technical specification of your camera such as view angle, etc.
- Module Location
Node list > FDOPENCV_HARK:Misc > CvfdhCameraSpecSetter
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
VIEW_ANGLE | object | <Vector<float> 40.0 30.0> | View angles of your camera in horizontal and vertical axes. |
TRANS_OFFSET | object | <Vector<float> 0.0 0.0> | Horizontal and vertical offset of your camera for concatenating more than two images. |
TRANS_OFFSET_SCALE | object | <Vector<float> 1.0 1.0> | Horizontal and vertical scales for concatenating more than two camera images. |
RADIUS_SCALE | object | 1.0 | Diffusive scale for concatenating more than two camera images. |
CAMERA_POS | object | <Vector<float> 0.0 0.0 0.0> | 3D location of your camera from the basis |
CvfdhSrcInfoTracker
- Module Description
This module tracks each segment with a preferred manner.
This module is similar to SourceTracker in HARK audio processing.
The manner includes the size of RoI, aspect ratio of the RoI, life time of the RoI, and interval of RoIs.
- Module Location
Node list > FDOPENCV_HARK:ROI > CvfdhSrcInfoTracker
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
USE_ROI_SIZE | bool | false | If true the RoI selection based on the size is enabled. |
ROI_SIZE | object | <Vector<int> 10 10> | Specifies the maximum and minumum size of RoI for the selection. This is [x pixels * y pixels]. |
USE_ASPECT_RATIO | bool | false | If true the RoI selection based on the aspect ratio is enabled. |
ASPECT_RATIO | object | <Vector<float> 0.0 0.0> | Specifies the maximum and minumum aspect ratio of RoIs for the selection. This is y [pixels / x pixels]. |
USE_PAUSE_LENGTH | bool | true | If true the RoI elimination based on the life duration is enabled. |
PAUSE_LENGTH | float | 100.0 | Specifies the life duration of RoIs for the elimination. |
USE_MIN_SRC_INTERVAL | bool | true | If true the RoI elimination based on the interval is enabled. |
SRC_INTERVAL | float | 100.0 | Specifies the interval of RoIs for the elimination. |
ENABLE_DEBUG | bool | false | Output debug information if true. |
CvfdhSrcInfoFormatConverter
- Module Description
This module transforms the object tracking result to HARK source format.
The output of this module can be utilized for HARK audio processing.
To convert the object tracking result, you should specify the view angle of your camera in CvfdhCameraSpecSetter.
- Module Location
Node list > FDOPENCV_HARK:ROI > CvfdhSrcInfoFormatConverter
- Property settings
There is no parameter in this module.
DisplayLocalization
This is a HARK standard module.
Therefore, all description is available at HARK document.
Examining the network file
Save the network file before closing [e.g.) cvColorTracker.n ] Connect your camera supported by OpenCV [e.g.) USB camera] Go to the terminal and run the HARK network file
./cvColorTracker.n
You’ll see the following two things:
- A video stream in BaseImage window with a detected segment.
- Time trajectory of the object tracking result in azimuth axis