using trainCasca​deObjectDe​tector for online game

조회 수: 4 (최근 30일)
ben
ben 2018년 8월 6일
편집: Florian Morsch 2018년 8월 7일
Hi,
Im trying to create a code for online game that detects specific objects from the image by using xml that created by training cascade to detect it.
I inserted around 40 positive images where in each one I used ROI tool and around 500 negative.
Image for example (grey rocks, the image was taken from google):
The results were very bad and I tried using different numbers of stages.
Is there any limitations to trainCascadeObjectDetector for detecting objects?
If not what might be the reason for detecting around 400 objects in the picture instead on 3?
Thank you

답변 (1개)

Florian Morsch
Florian Morsch 2018년 8월 7일
편집: Florian Morsch 2018년 8월 7일
This depends on the object you want to detect, 40 pictures might not nearly be enough. Cascade object detector can only detect objects to a certain angle and the width to heigth ratio shouldnt vary so much. For good results with the object detector you should consider a lot more positive and a even more negative images. And even then it depends on the object you want to detect, if the object is only a few pixels you wont have a good chance to get it to work.
If you can attach a example picture and the object you want to detect it would be easier to see, if it can be done.
EDIT: Since you now have a picture attached: The cascade object detector is meant to detect objects which doesnt vary much in ratio. Since the objects you want to detect have a variable ratio you will have a hard time to do so. Also there are not many significant points which could different the objects, so to get a reliable detector you would need a lot of positives and negatives, and even then you could get false detections. (by a lot i mean like 5000 positiv and 30000 or more negatives).
You also might want to try a different feature, cascade object detector can work with Haar, LBP or HOG features. https://de.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
If you change the detection feature you might get better results.

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by