Compute likelihood of object on table based on color space histogram. In tabletop object detection, color is a good feature to detect objects. Idea is simple.
First compute “average” color of the pixels of the polygon. Second compute “distance” between the “average” color and the pixel for each pixels in the polygon.
However, there is problem in “average” and “distance”. If polygon is clean, we can get expected result from simple average and distance computation. However if polygon is cluttered, we will get unexpected result because average of pixels is fesible feature.
TabletopColorDifferenceLikelihood uses histogram to resolve the issue.
- Compute histogram of the pixels in a polygon.
- Mark top N histograms which covers the area which is computed by multiplying given ratio and all the area of hisotgrams.
- Compute minimum distance between a pixel and the N histograms for each pixel in the polygon.
Single channel color image
Input camera info
Result distance image.
Image to visualize histogram. Red bars are extracted top N histograms.
Image to visualize polygons projected on 2-D image.
Queue length of tf message filters
Set to true if the channel is circular value.
The number of bins in histogram.
Minimum and maximum value in the color space.
Ratio of extracting top N histograms.