Ask Your Question

Which way to solve this

asked 2013-09-13 16:53:33 -0500

f8 gravatar image

Hello everyone, I'm doing my student project and I have problem to solve. I tried few methods but its not that simple, so I would be nice if someone experienced show me which way to go. My target is to find small white rectangle on center of 1st picture, and center-bottom 2nd one. Problem is sometimes, like on 1st pic its brighter, sometimes its darker, but always it is almost-white rectangle and have very similar size.

Does anyone want to help me?

image description

image description

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-09-14 00:00:20 -0500

In the first you have to increase resolution of image in the next stage for detect rectangle you need use edge of image because the edge detection insensitive to changes of illumination in the image you have to use a method robust to illumination in the next stage you have to use hough line for detection line & rectangle this link help you to detection rectangle.

edit flag offensive delete link more

answered 2013-09-14 13:28:36 -0500

Gino Strato gravatar image

You have 2 peaces of information:
1) shape
If you want to detect a shape all at once with the principle of Hough transform without relying on multiple lines you can perform a Generalized Hough Transform search.
On this website there is a base for your own implementation of GHT as well as a nice tutorial. Or you can also try a chamfer matching. But I don’t like the code provided with OpenCv.
The code in the link I provided is not so beautiful but it’s effective and easy to understand, the one with OpenCv just the reverse. Try and see if there is a different implementation of it. Both methods tolerate a small amount of rotation and warping.

2) colour
You have to implement a Bayesian method which provides the probability of every pixel (or better group of pixels to smooth noise) to be inside the white rectangle: P(rectangle|colour).

At the end you should find a way to put together information 1 and 2

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-09-13 16:53:33 -0500

Seen: 242 times

Last updated: Sep 14 '13