My question is, why do you need a haar cascade for that task? Aren't there easier ways to detect circular shapes?
If your environment is rather stable, without extreme lighting variations and other external factors, there are simpler approaches to detect circular shapes on images.
There are other environmental factors. Will all the circular shapes be dishes in your work setup? Or anything is possible?
Simpler approaches:
You can try to use opencv's implementation of Hough Circles that detects circular shapes in images. That method has a threshold that lets you be more or less demanding on the circularity of the shape.
Other approach can be checking the form factor of a blob, this method would go something like:
- Detect edges with Canny operator
- Close morphological operation to assure edge connectivity
- Fill holes on binary image to have full white blobs
- Analyse blob to check which ones are circular (one way to do this is to check the blob's form factor (4piArea / Perimeter^2), which for circular shapes is very close to 1)
- Once you detect a circular shape, you can process it further to verify if it is actually a dish or something else.
Haar cascade
For hard environments a machine learning approach may be a good choice.
The first thing to do is to acquire a large data of plates on a wide variety of environments. You also need a large set of negative images, meaning, images without plates.
Opencv has the traincascade application that generates a xml file that you can load into your program later.
- The first thing to do is to use the createsamples utility that organizes your positive and negative data into a .vec file
- Use traincascade to generate the xml with the haar cascade.
- Load into program and check results
Good luck
EDIT: I may be wrong, but judging by your C# tag you are creating an app for a mobile device? So the point is to have people downloading an app and point the camera to a dish and have something happen? If that is the case, an haar cascade is the way to go.