Detecting truck wheels

假如想象 提交于 2019-11-29 21:28:38
karlphillip

In this answer I describe an approach that was tested successfully with the following images:

The image processing pipeline begins by either downsampling the input image, or performing a color reduction operation to decrease the amount data (colors) in the image. This creates smaller groups of pixels to work with. I chose to downsample:

The 2nd stage of the pipeline performs a gaussian blur in order to smooth/blur the images:

Next, the images are ready to be thresholded, i.e binarized:

The 4th stage requires executing Hough Circles on the binarized image to locate the wheels:

The final stage of the pipeline would be to draw the circles that were found over the original image:

This approach is not a robust solution. It's meant only to inspire you to continue your search for answers.

I don't do C#, sorry. Good luck!

First, the wheels projections are ellipses and not circles. Second, some background gradient can easily produce circle-like object so there should be no surprise here. The problem with ellipses of course is that they have 5 DOF and not 3DOF as circles. Note thatfive dimensional Hough space becomes impractical. Some generalized Hough transforms can probably solve ellipse problem at the expense of a lot of additional false alarm (FA) circles. To counter FA you have to verify that they really are wheels that belong to a truck and nothing else.

You probably need to start with specifying your problem in terms of objects and backgrounds rather than wheel detection. This is important since objects would create a visual context to detect wheels and background analysis will show how easy would it be to segment a truck (object) on the first place. If camera is static one can use motion to detect background. If background is relatively uniform a gaussian mixture models of its colors may help to eliminate much of it.

I strongly suggest using: http://cvlabwww.epfl.ch/~lepetit/papers/hinterstoisser_pami11.pdf

and the C# implementation: https://github.com/dajuric/accord-net-extensions

(take a look at samples)

This algorithm can achieve real-time performance by using more than 2000 templates (20-30 fps) - so you can cover ellipse (projection) and circle shape cases. You can modify hand tracking sample (FastTemplateMatchingDemo)

by putting your own binary templates (make them in Paint :-))

P.S: To suppress false-positives some kind of tracking is also incorporated. The link to the library that I have posted also contains some tracking algortihms like: Discrete Kalman Filter and Particle Filter all with samples!

This library is still under development so there is possibility that something will not work. Please do not hesitate sending me a message.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!