From aa5ea340f722bfdcd147b184812ad34952fd516c Mon Sep 17 00:00:00 2001 From: WU Jia <35290826+kaingwade@users.noreply.github.com> Date: Fri, 22 Mar 2024 04:40:10 +0800 Subject: [PATCH] Move objdetect HaarCascadeClassifier and HOGDescriptor to contrib xobjdetect (#25198) * Move objdetect parts to contrib * Move objdetect parts to contrib * Minor fixes. --- CMakeLists.txt | 2 +- apps/CMakeLists.txt | 2 - apps/annotation/CMakeLists.txt | 3 - apps/annotation/opencv_annotation.cpp | 317 - apps/visualisation/CMakeLists.txt | 3 - apps/visualisation/opencv_visualisation.cpp | 378 - data/CMakeLists.txt | 9 - data/haarcascades/haarcascade_eye.xml | 12213 -- .../haarcascade_eye_tree_eyeglasses.xml | 22619 ---- .../haarcascade_frontalcatface.xml | 14382 -- .../haarcascade_frontalcatface_extended.xml | 13394 -- .../haarcascade_frontalface_alt.xml | 24350 ---- .../haarcascade_frontalface_alt2.xml | 20719 --- .../haarcascade_frontalface_alt_tree.xml | 96484 -------------- .../haarcascade_frontalface_default.xml | 33314 ----- data/haarcascades/haarcascade_fullbody.xml | 17030 --- .../haarcascade_lefteye_2splits.xml | 7390 - ...haarcascade_license_plate_rus_16stages.xml | 1404 - data/haarcascades/haarcascade_lowerbody.xml | 14056 -- data/haarcascades/haarcascade_profileface.xml | 29690 ----- .../haarcascade_righteye_2splits.xml | 7407 -- .../haarcascade_russian_plate_number.xml | 2656 - data/haarcascades/haarcascade_smile.xml | 6729 - data/haarcascades/haarcascade_upperbody.xml | 28134 ---- data/haarcascades_cuda/haarcascade_eye.xml | 15452 --- .../haarcascade_eye_tree_eyeglasses.xml | 33158 ----- .../haarcascade_frontalface_alt.xml | 26161 ---- .../haarcascade_frontalface_alt2.xml | 23550 ---- .../haarcascade_frontalface_alt_tree.xml | 103493 --------------- .../haarcascade_frontalface_default.xml | 35712 ----- .../haarcascade_fullbody.xml | 18118 --- .../haarcascade_lefteye_2splits.xml | 9803 -- .../haarcascade_lowerbody.xml | 15085 --- .../haarcascade_profileface.xml | 31930 ----- .../haarcascade_righteye_2splits.xml | 9833 -- data/haarcascades_cuda/haarcascade_smile.xml | 8353 -- .../haarcascade_upperbody.xml | 29767 ----- data/hogcascades/hogcascade_pedestrians.xml | 3986 - .../lbpcascades/lbpcascade_frontalcatface.xml | 3768 - data/lbpcascades/lbpcascade_frontalface.xml | 1505 - .../lbpcascade_frontalface_improved.xml | 1469 - data/lbpcascades/lbpcascade_profileface.xml | 1275 - data/lbpcascades/lbpcascade_silverware.xml | 1279 - data/readme.txt | 7 - data/vec_files/trainingfaces_24-24.vec | Bin 19047572 -> 0 bytes doc/CMakeLists.txt | 8 +- .../js_face_detection.markdown | 107 - .../js_face_detection_camera.markdown | 15 - .../js_table_of_contents_objdetect.markdown | 11 - doc/js_tutorials/js_tutorials.markdown | 5 - doc/opencv.bib | 36 - .../py_face_detection.markdown | 4 - doc/py_tutorials/py_tutorials.markdown | 2 +- .../desktop_java/java_dev_intro.markdown | 6 +- .../aruco_board_detection.markdown | 2 + .../barcode_detect_and_decode.markdown | 3 +- .../images/barcode_book.jpg | Bin .../images/barcode_book_res.jpg | Bin .../table_of_content_objdetect.markdown | 1 + .../others/cascade_classifier.markdown | 148 - ...ascade_Classifier_Tutorial_Result_Haar.jpg | Bin 56064 -> 0 bytes ...Cascade_Classifier_Tutorial_Result_LBP.jpg | Bin 53370 -> 0 bytes doc/tutorials/others/images/haar.png | Bin 7625 -> 0 bytes doc/tutorials/others/images/haar_features.jpg | Bin 10964 -> 0 bytes .../images/visualisation_single_stage.png | Bin 114233 -> 0 bytes .../others/images/visualisation_video.png | Bin 284988 -> 0 bytes .../others/introduction_to_pca.markdown | 2 +- doc/tutorials/others/optical_flow.markdown | 2 +- .../others/table_of_content_other.markdown | 4 +- doc/tutorials/tutorials.markdown | 2 +- include/opencv2/opencv.hpp | 3 - modules/js/test/test_objdetect.js | 85 - modules/objdetect/doc/pics/haarfeatures.png | Bin 2988 -> 0 bytes .../objdetect/include/opencv2/objdetect.hpp | 608 - .../objdetect/detection_based_tracker.hpp | 222 - .../misc/java/test/CascadeClassifierTest.java | 104 - .../misc/java/test/HOGDescriptorTest.java | 259 - .../misc/java/test/ObjdetectTest.java | 42 - .../misc/python/pyopencv_objdetect.hpp | 3 - .../misc/python/test/test_facedetect.py | 92 - .../misc/python/test/test_peopledetect.py | 65 - .../objdetect/perf/opencl/perf_cascades.cpp | 61 - .../objdetect/perf/opencl/perf_hogdetect.cpp | 93 - modules/objdetect/src/cascadedetect.cpp | 1763 - modules/objdetect/src/cascadedetect.hpp | 656 - .../objdetect/src/cascadedetect_convert.cpp | 275 - .../objdetect/src/detection_based_tracker.cpp | 885 - modules/objdetect/src/hog.cpp | 3523 - modules/objdetect/src/opencl/cascadedetect.cl | 661 - modules/objdetect/src/opencl/objdetect_hog.cl | 633 - .../test/opencl/test_hogdetector.cpp | 140 - modules/objdetect/test/test_cascadeandhog.cpp | 1366 - platforms/js/opencv_js.config.py | 4 +- samples/cpp/dbt_face_detection.cpp | 111 - samples/cpp/facedetect.cpp | 257 - samples/cpp/facial_features.cpp | 215 - samples/cpp/peopledetect.cpp | 129 - samples/cpp/smiledetect.cpp | 215 - .../objectDetection/objectDetection.cpp | 107 - samples/gpu/cascadeclassifier.cpp | 316 - samples/gpu/hog.cpp | 552 - .../sbt/src/main/java/DetectFaceDemo.java | 2 +- .../src/main/scala/ScalaDetectFaceDemo.scala | 2 +- .../ObjectDetectionDemo.java | 98 - samples/python/facedetect.py | 79 - samples/python/peopledetect.py | 76 - .../cascade_classifier/objectDetection.py | 61 - samples/tapi/hog.cpp | 352 - samples/tapi/ufacedetect.cpp | 253 - .../FaceDetection/MainPage.xaml.h | 2 +- .../video_capture_xaml.Shared/main.cpp | 2 +- 111 files changed, 22 insertions(+), 741097 deletions(-) delete mode 100644 apps/annotation/CMakeLists.txt delete mode 100644 apps/annotation/opencv_annotation.cpp delete mode 100644 apps/visualisation/CMakeLists.txt delete mode 100644 apps/visualisation/opencv_visualisation.cpp delete mode 100644 data/CMakeLists.txt delete mode 100644 data/haarcascades/haarcascade_eye.xml delete mode 100644 data/haarcascades/haarcascade_eye_tree_eyeglasses.xml delete mode 100644 data/haarcascades/haarcascade_frontalcatface.xml delete mode 100644 data/haarcascades/haarcascade_frontalcatface_extended.xml delete mode 100644 data/haarcascades/haarcascade_frontalface_alt.xml delete mode 100644 data/haarcascades/haarcascade_frontalface_alt2.xml delete mode 100644 data/haarcascades/haarcascade_frontalface_alt_tree.xml delete mode 100644 data/haarcascades/haarcascade_frontalface_default.xml delete mode 100644 data/haarcascades/haarcascade_fullbody.xml delete mode 100644 data/haarcascades/haarcascade_lefteye_2splits.xml delete mode 100644 data/haarcascades/haarcascade_license_plate_rus_16stages.xml delete mode 100644 data/haarcascades/haarcascade_lowerbody.xml delete mode 100644 data/haarcascades/haarcascade_profileface.xml delete mode 100644 data/haarcascades/haarcascade_righteye_2splits.xml delete mode 100644 data/haarcascades/haarcascade_russian_plate_number.xml delete mode 100644 data/haarcascades/haarcascade_smile.xml delete mode 100644 data/haarcascades/haarcascade_upperbody.xml delete mode 100644 data/haarcascades_cuda/haarcascade_eye.xml delete mode 100644 data/haarcascades_cuda/haarcascade_eye_tree_eyeglasses.xml delete mode 100644 data/haarcascades_cuda/haarcascade_frontalface_alt.xml delete mode 100644 data/haarcascades_cuda/haarcascade_frontalface_alt2.xml delete mode 100644 data/haarcascades_cuda/haarcascade_frontalface_alt_tree.xml delete mode 100644 data/haarcascades_cuda/haarcascade_frontalface_default.xml delete mode 100644 data/haarcascades_cuda/haarcascade_fullbody.xml delete mode 100644 data/haarcascades_cuda/haarcascade_lefteye_2splits.xml delete mode 100644 data/haarcascades_cuda/haarcascade_lowerbody.xml delete mode 100644 data/haarcascades_cuda/haarcascade_profileface.xml delete mode 100644 data/haarcascades_cuda/haarcascade_righteye_2splits.xml delete mode 100644 data/haarcascades_cuda/haarcascade_smile.xml delete mode 100644 data/haarcascades_cuda/haarcascade_upperbody.xml delete mode 100644 data/hogcascades/hogcascade_pedestrians.xml delete mode 100644 data/lbpcascades/lbpcascade_frontalcatface.xml delete mode 100644 data/lbpcascades/lbpcascade_frontalface.xml delete mode 100644 data/lbpcascades/lbpcascade_frontalface_improved.xml delete mode 100644 data/lbpcascades/lbpcascade_profileface.xml delete mode 100644 data/lbpcascades/lbpcascade_silverware.xml delete mode 100644 data/readme.txt delete mode 100644 data/vec_files/trainingfaces_24-24.vec delete mode 100644 doc/js_tutorials/js_objdetect/js_face_detection/js_face_detection.markdown delete mode 100644 doc/js_tutorials/js_objdetect/js_face_detection/js_face_detection_camera.markdown delete mode 100644 doc/js_tutorials/js_objdetect/js_table_of_contents_objdetect.markdown delete mode 100644 doc/py_tutorials/py_objdetect/py_face_detection/py_face_detection.markdown rename doc/tutorials/{others => objdetect/barcode_detect_and_decode}/barcode_detect_and_decode.markdown (97%) rename doc/tutorials/{others => objdetect/barcode_detect_and_decode}/images/barcode_book.jpg (100%) rename doc/tutorials/{others => objdetect/barcode_detect_and_decode}/images/barcode_book_res.jpg (100%) delete mode 100644 doc/tutorials/others/cascade_classifier.markdown delete mode 100644 doc/tutorials/others/images/Cascade_Classifier_Tutorial_Result_Haar.jpg delete mode 100644 doc/tutorials/others/images/Cascade_Classifier_Tutorial_Result_LBP.jpg delete mode 100644 doc/tutorials/others/images/haar.png delete mode 100644 doc/tutorials/others/images/haar_features.jpg delete mode 100644 doc/tutorials/others/images/visualisation_single_stage.png delete mode 100644 doc/tutorials/others/images/visualisation_video.png delete mode 100644 modules/objdetect/doc/pics/haarfeatures.png delete mode 100644 modules/objdetect/include/opencv2/objdetect/detection_based_tracker.hpp delete mode 100644 modules/objdetect/misc/java/test/CascadeClassifierTest.java delete mode 100644 modules/objdetect/misc/java/test/HOGDescriptorTest.java delete mode 100644 modules/objdetect/misc/java/test/ObjdetectTest.java delete mode 100644 modules/objdetect/misc/python/test/test_facedetect.py delete mode 100644 modules/objdetect/misc/python/test/test_peopledetect.py delete mode 100644 modules/objdetect/perf/opencl/perf_cascades.cpp delete mode 100644 modules/objdetect/perf/opencl/perf_hogdetect.cpp delete mode 100644 modules/objdetect/src/cascadedetect.cpp delete mode 100644 modules/objdetect/src/cascadedetect.hpp delete mode 100644 modules/objdetect/src/cascadedetect_convert.cpp delete mode 100644 modules/objdetect/src/detection_based_tracker.cpp delete mode 100644 modules/objdetect/src/hog.cpp delete mode 100644 modules/objdetect/src/opencl/cascadedetect.cl delete mode 100644 modules/objdetect/src/opencl/objdetect_hog.cl delete mode 100644 modules/objdetect/test/opencl/test_hogdetector.cpp delete mode 100644 modules/objdetect/test/test_cascadeandhog.cpp delete mode 100644 samples/cpp/dbt_face_detection.cpp delete mode 100644 samples/cpp/facedetect.cpp delete mode 100644 samples/cpp/facial_features.cpp delete mode 100644 samples/cpp/peopledetect.cpp delete mode 100644 samples/cpp/smiledetect.cpp delete mode 100644 samples/cpp/tutorial_code/objectDetection/objectDetection.cpp delete mode 100644 samples/gpu/cascadeclassifier.cpp delete mode 100644 samples/gpu/hog.cpp delete mode 100644 samples/java/tutorial_code/objectDetection/cascade_classifier/ObjectDetectionDemo.java delete mode 100755 samples/python/facedetect.py delete mode 100755 samples/python/peopledetect.py delete mode 100644 samples/python/tutorial_code/objectDetection/cascade_classifier/objectDetection.py delete mode 100644 samples/tapi/hog.cpp delete mode 100644 samples/tapi/ufacedetect.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a628c1a6a..bb5195f22f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1036,7 +1036,7 @@ ocv_register_modules() add_subdirectory(doc) # various data that is used by cv libraries and/or demo applications. -add_subdirectory(data) +# add_subdirectory(data) # extra applications if(BUILD_opencv_apps) diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 84a0a1dcc5..d7780f9592 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -53,8 +53,6 @@ macro(ocv_add_app directory) endif() endmacro() -ocv_add_app(annotation) -ocv_add_app(visualisation) ocv_add_app(interactive-calibration) ocv_add_app(version) ocv_add_app(model-diagnostics) diff --git a/apps/annotation/CMakeLists.txt b/apps/annotation/CMakeLists.txt deleted file mode 100644 index a30846db41..0000000000 --- a/apps/annotation/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -ocv_add_application(opencv_annotation - MODULES opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio - SRCS opencv_annotation.cpp) diff --git a/apps/annotation/opencv_annotation.cpp b/apps/annotation/opencv_annotation.cpp deleted file mode 100644 index 13149b6990..0000000000 --- a/apps/annotation/opencv_annotation.cpp +++ /dev/null @@ -1,317 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (C) 2000-2008, Intel Corporation, all rights reserved. -// Copyright (C) 2009, Willow Garage Inc., all rights reserved. -// Copyright (C) 2013, OpenCV Foundation, all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//////////////////////////////////////////////////////////////////////////////////////// - -/***************************************************************************************************** -USAGE: -./opencv_annotation -images -annotations - -Created by: Puttemans Steven - February 2015 -Adapted by: Puttemans Steven - April 2016 - Vectorize the process to enable better processing - + early leave and store by pressing an ESC key - + enable delete `d` button, to remove last annotation -*****************************************************************************************************/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -using namespace std; -using namespace cv; - -// Function prototypes -void on_mouse(int, int, int, int, void*); -vector get_annotations(Mat); - -// Public parameters -Mat image; -int roi_x0 = 0, roi_y0 = 0, roi_x1 = 0, roi_y1 = 0, num_of_rec = 0; -bool start_draw = false, stop = false; - -// Window name for visualisation purposes -const string window_name = "OpenCV Based Annotation Tool"; - -// FUNCTION : Mouse response for selecting objects in images -// If left button is clicked, start drawing a rectangle as long as mouse moves -// Stop drawing once a new left click is detected by the on_mouse function -void on_mouse(int event, int x, int y, int , void * ) -{ - // Action when left button is clicked - if(event == EVENT_LBUTTONDOWN) - { - if(!start_draw) - { - roi_x0 = x; - roi_y0 = y; - start_draw = true; - } else { - roi_x1 = x; - roi_y1 = y; - start_draw = false; - } - } - - // Action when mouse is moving and drawing is enabled - if((event == EVENT_MOUSEMOVE) && start_draw) - { - // Redraw bounding box for annotation - Mat current_view; - image.copyTo(current_view); - rectangle(current_view, Point(roi_x0,roi_y0), Point(x,y), Scalar(0,0,255)); - imshow(window_name, current_view); - } -} - -// FUNCTION : returns a vector of Rect objects given an image containing positive object instances -vector get_annotations(Mat input_image) -{ - vector current_annotations; - - // Make it possible to exit the annotation process - stop = false; - - // Init window interface and couple mouse actions - namedWindow(window_name, WINDOW_AUTOSIZE); - setMouseCallback(window_name, on_mouse); - - image = input_image; - imshow(window_name, image); - int key_pressed = 0; - - do - { - // Get a temporary image clone - Mat temp_image = input_image.clone(); - Rect currentRect(0, 0, 0, 0); - - // Keys for processing - // You need to select one for confirming a selection and one to continue to the next image - // Based on the universal ASCII code of the keystroke: http://www.asciitable.com/ - // c = 99 add rectangle to current image - // n = 110 save added rectangles and show next image - // d = 100 delete the last annotation made - // = 27 exit program - key_pressed = 0xFF & waitKey(0); - switch( key_pressed ) - { - case 27: - stop = true; - break; - case 99: - // Draw initiated from top left corner - if(roi_x0roi_x1 && roi_y0>roi_y1) - { - currentRect.x = roi_x1; - currentRect.y = roi_y1; - currentRect.width = roi_x0-roi_x1; - currentRect.height = roi_y0-roi_y1; - } - // Draw initiated from top right corner - if(roi_x0>roi_x1 && roi_y0roi_y1) - { - currentRect.x = roi_x0; - currentRect.y = roi_y1; - currentRect.width = roi_x1-roi_x0; - currentRect.height = roi_y0-roi_y1; - } - // Draw the rectangle on the canvas - // Add the rectangle to the vector of annotations - current_annotations.push_back(currentRect); - break; - case 100: - // Remove the last annotation - if(current_annotations.size() > 0){ - current_annotations.pop_back(); - } - break; - default: - // Default case --> do nothing at all - // Other keystrokes can simply be ignored - break; - } - - // Check if escape has been pressed - if(stop) - { - break; - } - - // Draw all the current rectangles onto the top image and make sure that the global image is linked - for(int i=0; i < (int)current_annotations.size(); i++){ - rectangle(temp_image, current_annotations[i], Scalar(0,255,0), 1); - } - image = temp_image; - - // Force an explicit redraw of the canvas --> necessary to visualize delete correctly - imshow(window_name, image); - } - // Continue as long as the next image key has not been pressed - while(key_pressed != 110); - - // Close down the window - destroyWindow(window_name); - - // Return the data - return current_annotations; -} - -int main( int argc, const char** argv ) -{ - // Use the cmdlineparser to process input arguments - CommandLineParser parser(argc, argv, - "{ help h usage ? | | show this message }" - "{ images i | | (required) path to image folder [example - /data/testimages/] }" - "{ annotations a | | (required) path to annotations txt file [example - /data/annotations.txt] }" - "{ maxWindowHeight m | -1 | (optional) images larger in height than this value will be scaled down }" - "{ resizeFactor r | 2 | (optional) factor for scaling down [default = half the size] }" - ); - // Read in the input arguments - if (parser.has("help")){ - parser.printMessage(); - cerr << "TIP: Use absolute paths to avoid any problems with the software!" << endl; - return 0; - } - string image_folder(parser.get("images")); - string annotations_file(parser.get("annotations")); - if (image_folder.empty() || annotations_file.empty()){ - parser.printMessage(); - cerr << "TIP: Use absolute paths to avoid any problems with the software!" << endl; - return -1; - } - - int resizeFactor = parser.get("resizeFactor"); - int const maxWindowHeight = parser.get("maxWindowHeight") > 0 ? parser.get("maxWindowHeight") : -1; - - // Start by processing the data - // Return the image filenames inside the image folder - map< String, vector > annotations; - vector filenames; - String folder(image_folder); - glob(folder, filenames); - - // Add key tips on how to use the software when running it - cout << "* mark rectangles with the left mouse button," << endl; - cout << "* press 'c' to accept a selection," << endl; - cout << "* press 'd' to delete the latest selection," << endl; - cout << "* press 'n' to proceed with next image," << endl; - cout << "* press 'esc' to stop." << endl; - - // Loop through each image stored in the images folder - // Create and temporarily store the annotations - // At the end write everything to the annotations file - for (size_t i = 0; i < filenames.size(); i++){ - // Read in an image - Mat current_image = imread(filenames[i]); - bool const resize_bool = (maxWindowHeight > 0) && (current_image.rows > maxWindowHeight); - - // Check if the image is actually read - avoid other files in the folder, because glob() takes them all - // If not then simply skip this iteration - if(current_image.empty()){ - continue; - } - - if(resize_bool){ - resize(current_image, current_image, Size(current_image.cols/resizeFactor, current_image.rows/resizeFactor), 0, 0, INTER_LINEAR_EXACT); - } - - // Perform annotations & store the result inside the vectorized structure - // If the image was resized before, then resize the found annotations back to original dimensions - vector current_annotations = get_annotations(current_image); - if(resize_bool){ - for(int j =0; j < (int)current_annotations.size(); j++){ - current_annotations[j].x = current_annotations[j].x * resizeFactor; - current_annotations[j].y = current_annotations[j].y * resizeFactor; - current_annotations[j].width = current_annotations[j].width * resizeFactor; - current_annotations[j].height = current_annotations[j].height * resizeFactor; - } - } - annotations[filenames[i]] = current_annotations; - - // Check if the ESC key was hit, then exit earlier then expected - if(stop){ - break; - } - } - - // When all data is processed, store the data gathered inside the proper file - // This now even gets called when the ESC button was hit to store preliminary results - ofstream output(annotations_file.c_str()); - if ( !output.is_open() ){ - cerr << "The path for the output file contains an error and could not be opened. Please check again!" << endl; - return 0; - } - - // Store the annotations, write to the output file - for(map >::iterator it = annotations.begin(); it != annotations.end(); it++){ - vector &anno = it->second; - output << it->first << " " << anno.size(); - for(size_t j=0; j < anno.size(); j++){ - Rect temp = anno[j]; - output << " " << temp.x << " " << temp.y << " " << temp.width << " " << temp.height; - } - output << endl; - } - - return 0; -} diff --git a/apps/visualisation/CMakeLists.txt b/apps/visualisation/CMakeLists.txt deleted file mode 100644 index eaddf776ec..0000000000 --- a/apps/visualisation/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -ocv_add_application(opencv_visualisation - MODULES opencv_core opencv_highgui opencv_imgproc opencv_videoio opencv_imgcodecs - SRCS opencv_visualisation.cpp) diff --git a/apps/visualisation/opencv_visualisation.cpp b/apps/visualisation/opencv_visualisation.cpp deleted file mode 100644 index 9b7fcd9f48..0000000000 --- a/apps/visualisation/opencv_visualisation.cpp +++ /dev/null @@ -1,378 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (C) 2000-2008, Intel Corporation, all rights reserved. -// Copyright (C) 2009, Willow Garage Inc., all rights reserved. -// Copyright (C) 2013, OpenCV Foundation, all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//////////////////////////////////////////////////////////////////////////////////////// - -/***************************************************************************************************** - -Software for visualising cascade classifier models trained by OpenCV and to get a better -understanding of the used features. - -USAGE: -./opencv_visualisation --model= --image= --data=