Ask Your Question

Comparing a captured image with a given image.

asked 2016-03-11 05:13:52 -0500

YaddyVirus gravatar image

Hi there! I am working on a project which requires the detection of road signs. I was wondering that if I could take sample images of the road signs, save them onto my PC(final version to run on Raspberry Pi), and then as the camera runs, it keeps on checking the presence of the sign stored in the memory and when it is found takes appropriate action(For example if I implement it in a robot, whenever the robot sees a stop sign, it should stop for, say 10 seconds and then start moving again.)

Can anyone help me out on this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-03-11 06:00:36 -0500

For the extra-super simple version that won't work in real life, you could use the template matching function. You store all the signs you want to recognise into your hard drive, you load it, and keep searching for those.

For a more realistic solution in real world, I suggest you have a look at the Cascade Classifier to identify road sign and then try to interpret them (maybe also on a first approach with the template matching approach). You could also have a look at that book that has a nice chapter on how to optimise the detection of object.

If you have trouble to identify the road sign as they are not parallel to your camera plan, have a look at the homography estimation with this tutorial. It could also be a way to directly identify and/or recognise signs in the road (using the feature descriptors approach).

Keep in mind that this is not an easy task (especially on a RaspPi) and you may have to deal with lot of tricks to make it apprends in your situation. But still, this is a really interesting challenge and you could expect not so bad results with all the OpenCV functionalities!

Enjoy ;-)

edit flag offensive delete link more


Thanks there! The Cascade Classifier methods looks nice, I read about the Template matching function earlier this morning and I'm thinking its worth a try... I'm gonna try both methods and see which works best on first my PC and then the RPi. The homography estimation tutorial is only a hell lot if code and no explanation, so that's gonna take me some time to interpret (I'm new to C/C++ been coding in Java and C# till now).

One more question that I came across was that I am using OpenCV in a Windows environment on VS thereby coding in C/C++ and I found that OpenCV code on the RPi is written in Python(atleast in all the tutorials I came across). So do I need to convert my code from C to Python or I can use it as I'm using it ...(more)

YaddyVirus gravatar imageYaddyVirus ( 2016-03-11 13:46:17 -0500 )edit

Question Tools

1 follower


Asked: 2016-03-11 05:13:52 -0500

Seen: 1,221 times

Last updated: Mar 11 '16