本文整理汇总了C++中CBlobResult::PrintBlobs方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlobResult::PrintBlobs方法的具体用法?C++ CBlobResult::PrintBlobs怎么用?C++ CBlobResult::PrintBlobs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlobResult
的用法示例。
在下文中一共展示了CBlobResult::PrintBlobs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBlobs
CBlobResult getBlobs(IplImage* tmp_frame, IplImage* binFore){
//IplImage* binFore = cvCreateImage(cvGetSize(tmp_frame),IPL_DEPTH_8U,1);
//get the binary foreground object
//cvSub( getBinaryImage(tmp_frame) , binBack, binFore, NULL );
//if(!cvSaveImage("binFore.jpg",binFore)) printf("Could not save the backgroundimage\n");
//!Starting the extracting of Blob
CBlobResult blobs;
//! get the blobs from the image, with no mask, using a threshold of 100
blobs = CBlobResult( binFore, NULL, 10, true );
//! Create a file with all the found blob
blobs.PrintBlobs( "blobs.txt" );
//! discard the blobs with less area than 60 pixels
blobs.Filter( blobs, B_INCLUDE, CBlobGetArea(), B_GREATER, 40);
//!This two row of code are to filter the blob find from the library by a bug that match ablob like all the image and return the center of it
blobs.Filter( blobs, B_INCLUDE, CBlobGetArea(), B_LESS, (tmp_frame->height)*(tmp_frame->width)*0.8);
blobs.Filter( blobs, B_INCLUDE, CBlobGetPerimeter(), B_LESS, (tmp_frame->height)+(tmp_frame->width)*2*0.8);
//! Create a file with filtered results
blobs.PrintBlobs( "filteredBlobs.txt" );
//return blobs;
return blobs;
}