Detect specific object with haar cascade clasifier
Hi All,
I want to detect some specific objects like brush or watch , so i created cascade clasifier by using train cascase classifier. the width and height i gave was 20 and 20 by following this post . Image used was C:\fakepath\watch5050.jpg
I wrote java program to detect this image where i read the image and convert to gray background and use detectMultiscale mthod below is the arguments passed
Imgproc.cvtColor(image, grayFrame, Imgproc.COLOR_BGR2GRAY);
//faceDetector.detectMultiScale(grayFrame, faceVectors); faceDetector.detectMultiScale(grayFrame, faceVectors, 1.1, 2, 0 | Objdetect.CASCADE_DO_ROUGH_SEARCH, new Size(20,20), new Size(50,50));
but when i run code and use worng image where there should not be any image detected i see 5 images detected C:\fakepath\detectoin.png
I am following wrong approach or have not trained cascade clasifier rightly ?
do not read blogposts, but docs
also don't try to train this with a single image.
how do i know if the cascade classifier is done properly.