views:

264

answers:

2

Hi guys,

How can I detect a quadrilateral signboard from an image captured using a mobile phone? How can i detect shapes like rectangle? rounded rectangle (rounded corners instead of shape corners)?

I am using opencv.wrapper but i am new to it.

Thanks.

Here is the sample: alt text

alt text

Due to the noise and many lines there, i am not able to determine which is the boundary line of the signboard. Sometimes I can find the boundary of the lines after hough transform. I am trapped....in this kind of scenario...

This is the 2 raw pictures taken from mobile phone camera

alt text alt text

I need ya advice to see how i can process the image to get the signboard out?

Thank you very much

+3  A: 

Keywords: opencv, hough transform

Duplicates:

http://stackoverflow.com/questions/1817442/

http://stackoverflow.com/questions/2068013/

Ahmet Kakıcı
Yeah, hough transform FTW!
zerm
but there are noise in the image how can i find out which is boundary of the signboard
@xabi123: hough transform, threshold, read out boundary
zerm
I used hough transform threshold...but there are still many lines...noises ard.. how to select which line is boundary...
Could you share a sample image?
Ahmet Kakıcı
I have uploaded 2 samples. Some of the boundary is not shown...and noises interferences make me veyr hard to identify the boundary lines...
Well your sample results are enough to find boundary. Now you have to calculate horizontal and vertical histograms. Peak values will give the coordinates of edges of your rectangle.
Ahmet Kakıcı
how to calculate horizontal and vertical histograms?
Here is another project uses histogram to detect boundaries. http://www.aforgenet.com/articles/hands_gesture_recognition/
Ahmet Kakıcı
are u refering the sample after edge detection or after hough transform?
Image at the right : http://www.freeimagehosting.net/uploads/e6b36040e8.png
Ahmet Kakıcı
Oic...this is one of the simple sample which has the least noise....
I upload another 2 raw image taken from mobile phone camera.. How shd I actually process the image to take the signboard out. Thanks..I need ya advice on this.
I have face some issuess.. I always have some part of boundary being cut off due to the noise near the bonudary lines. How can I resolve this issues?Thanks.
A: 

Another approach that you can take that is more robust to noises in this situation is to generate a curve of the mean gray-level of the image along the x-axis and along the y-axis. That is, compute the mean gray level for each line/column in the image.

If, for example, the signboard (or its borders) is lighter than its surroundings (which is the case for all the examples shown in the question) you will have two peaks in your x-axis curve (for the left and right and borders) and two peaks in you y-axis curve (for the top and bottom borders). Using a border detection technique for a 1-dimension signal (maybe a high-pass filter) you can deduce the corners coordinates of the signboard.

I have seen this approach being used to to detect license plates and also for face recognition (the nose tends to be the brighter part of the face, so it generates a peak in the x-axis and y-axis curves).

Alceu Costa