How to train two objects with different sizes for recognition in Opencv

Asked

Viewed 686 times

6

Hello, I am using Opencv version 2.4.11 to train license plate recognition for a parking software. The problem is when training to identify the car plate, truck, truck where the plates used by them are of the same dimensions the Cascade gets 100%.

When I train to recognize the motorcycle plates along with the car plates the answer is not effective when I try to capture the motorcycle plates as the dimensions are different.

The plates of cars and trucks etc. have the format of a rectangle already the bikes is more to a square so if I train the vectors of motorcycle and other vehicles together, will only work the recognition either of one or the other.

  • Hello Fabrício. What is the proportion of motorcycle license plates examples for other vehicles? Did you ever train two separate qualifiers (one for motorcycles and one for other vehicles)? Perhaps this is easier, due to these differences of dimensions that you mention (by the way, other differences that may be relevant are the distance between the digits and their aspect ratio).

  • P.S.: Just a semantic question: if you are using Cascade, then you are not "recognizing" the plates, but locating them in the image (that is, finding a region that resembles a vehicular plate). Recognition should be the next step you want to take (where the pixel region will literally be "translated" into a string of type "AAA 2222").

  • Yes I got to train the two separately, and it works, but then it would raise another question: How would I make my software identify which one to use, IE, I charge the Scade to identify motorcycle plates but the vehicle analyzed will be a car. All right I could specify that it is a car that I will evaluate but it is a parking entrance so I have to make it automatic.

  • A: PS. That’s right, I’m using Cascade to recognize the location of the board after I’ll apply OCR for letter recognition.

  • Good, in principle if you did using the images of motorcycle plates as examples negative to train the detector of car plates (and vice versa), just apply the two detectors. Only one of them will return you a result. So, if you have a human user you do most of the time automatically, and only ask for help to the human (to identify if it is car or bike) in case of double-positive (which ideally, will occur very little).

  • This question is currently with 3 votes to close, the 3 as "it is not clear what you are asking". I don’t understand the area of computer vision, but I particularly (think) understood the question. Would any of the people who voted to close or who will vote to close, like to give further explanations on the possible closure?

  • I do not think it was obscure what I asked, on the contrary I left the question as clear as possible. And by the way I asked the same question on the official site of opencv.org and because it is different sizes should be done different workouts in this case. http://answers.opencv.org/question/61317/how-to-train-two-objects-with-different-sizes-in-opencv/

  • Fabricio, I had not seen his last message (about having posted also on the official website of Opencv). If you’ve come to a conclusion, why don’t you put an answer to this question? So you also help other people who in the future might have the same doubt.

  • You are right...

Show 4 more comments

1 answer

3

Of all the research I did on this subject were not satisfactory, but according to responses on the Open CV website we came to a conclusion that we should train the two types of separate board, In other words, we train the vectors to search for a license plate in a license plate and another license plate search.

Within the software is that we must make the distinction, that at a time before identification the user will inform whether the plate is motorcycle or vehicle (car, truck, pickup).

  • Any response that might improve this situation will be welcome, for sure.

  • 1

    You came to discuss, or test, whether the use of images from a group like negative examples the other during training improves this differentiation during recognition, as I had suggested? Maybe it improves the results a lot, maybe it doesn’t. It all depends on how different Features really are, but my intuition says it should improve a bit because of the differences in the distance between the digits and the aspect ratio of the plates.

  • And again, if the detectors are robust enough, you can test both in the photo and choose the object (car or bike) automatically. Only if both give positive (doubt) would ask the user. Or, of course, if the user wants to force an answer (this option should always be possible, as it ensures that even in case of detection errors the user can choose the correct option).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.