OpenCV speed traffic sign detection

后端 未结 4 1622
再見小時候
再見小時候 2020-12-16 06:37

I have a problem detecting speed traffic signs with opencv 2.4 for Android. I do the following:

\"capture frame -> convert it to HSV -> extract red areas -> detect

4条回答
  •  甜味超标
    2020-12-16 07:02

    You can find a review of traffic signs detection methods here and here.

    You'll see that there are 2 ways you can achieve this:

    1. Color-based (like what you're doing now)
    2. Shape-based

    In my experience, I found that shape-based methods works pretty good, because the color may change a lot under different lighting conditions, camera quality, etc.

    Since you need to detect speed traffic signs, which I assume are always circular, you can use an ellipse detector to find all circular objects in your image, and then apply some validation to determine if it's a traffic sign or not.

    Why ellipse detection?

    Well, since you're looking for perspective distorted circles, you are in fact looking for ellipses. Real-time ellipse detection is an interesting (although limited) research topic. I'll point you out to 2 papers with C++ source code available (which you can use in you app through native JNI calls):

    1. L. Libuda, I. Grothues, K.-F. Kraiss, Ellipse detection in digital image data using geometric features, in: J. Braz, A. Ranchordas, H. Arajo, J. Jorge (Eds.), Advances in Computer Graphics and Computer Vision, volume 4 of Communications in Computer and Information Science, Springer Berlin Heidelberg, 2007, pp. 229-239. link, code

    2. M. Fornaciari, A. Prati, R. Cucchiara, "A fast and effective ellipse detector for embedded vision applications", Pattern Recognition, 2014 link, code


    UPDATE

    I tried the method 2) without any preprocessing. You can see that at least the sign with the red border is detected very good:

提交回复
热议问题