class methods
variables
ofxCvBlob represents an area identified by the OpenCV plug-in as being a contiguous object in the scene. It's most often stored within a contrountFind instance and populated by a call to findContours().
In the image below you can see two blobs detected in the grayscale image:
draw(...)
void ofxCvBlob::draw(float x, float y)
This method draws the blob to the screen with the upper-left corner located at the point specified by the x and y values.
ofRectangle boundingRect
ofRectangle ofxCvBlob::boundingRect
an ofRectangle instance that can be drawn to the screen and that shows the height and width of the blob. This can be helpful to determine large regions of interest, or it can lead to some inaccurate results depending on the shape of your object. For instance, a squarish shape will be well represented by a rectangle, whereas a long thin shape with an angle in the middle will not.
ofPoint centroid
ofPoint ofxCvBlob::centroid
This is an ofPoint instance with its x and y positions set at the center of the boundaries of the blob.
bool hole
bool ofxCvBlob::hole
This is a Boolean value that indicates whether the blob contains a whole. This is also dependent on whether the call to findContours() in ofxContourFinder has the findHoles parameter set to true.
int nPts
int ofxCvBlob::nPts
This is an int that represents the number of points that are contained within the contour.
vector< ofPoint > pts
vector< ofPoint > ofxCvBlob::pts
This is a vector of ofPoint objects that represent the contour of the blob. This is different from the bounding rectangle. It's listing the different points around the edge of the blob. The bounding rectangle is a rectangle around the extreme points of the blob.
Last updated Tuesday, 19 November 2024 17:23:49 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue