diff --git a/data/detect_blob.png b/data/detect_blob.png new file mode 100644 index 000000000000..fe8537ab0fe1 Binary files /dev/null and b/data/detect_blob.png differ diff --git a/samples/cpp/exampleBLOB.cpp b/samples/cpp/detect_blob.cpp similarity index 95% rename from samples/cpp/exampleBLOB.cpp rename to samples/cpp/detect_blob.cpp index a1a020f06c58..badbaaa41650 100644 --- a/samples/cpp/exampleBLOB.cpp +++ b/samples/cpp/detect_blob.cpp @@ -9,9 +9,9 @@ using namespace cv; static void help() { - cout << "\n This program demonstrates how to use BLOB and MSER to detect region \n" + cout << "\n This program demonstrates how to use BLOB to detect and filter region \n" "Usage: \n" - " ./BLOB_MSER \n" + " ./detect_blob \n" "Press a key when image window is active to change descriptor"; } @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) Mat img(600, 800, CV_8UC1); if (argc == 1) { - fileName.push_back("../data/example_blob.bmp"); + fileName.push_back("../data/detect_blob.png"); } else if (argc == 2) { @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) help(); return(0); } - img = imread(fileName[0], IMREAD_UNCHANGED); + img = imread(fileName[0], IMREAD_COLOR); if (img.rows*img.cols <= 0) { cout << "Image " << fileName[0] << " is empty or cannot be found\n"; @@ -110,13 +110,11 @@ int main(int argc, char *argv[]) pDefaultBLOB.filterByConvexity = false; pDefaultBLOB.minConvexity = 0.95f; pDefaultBLOB.maxConvexity = (float)1e37; - // Descriptor array (BLOB or MSER) + // Descriptor array for BLOB vector typeDesc; // Param array for BLOB vector pBLOB; vector::iterator itBLOB; - // Param array for MSER - // Color palette vector< Vec3b > palette; for (int i = 0; i<65536; i++)