Main Page | Report this Page
Science Forum Index  »  Image Processing Forum  »  Line detection in chessboard image...
Page 1 of 1    

Line detection in chessboard image...

Author Message
magpie...
Posted: Sun Oct 04, 2009 12:38 pm
Guest
Hi,

I was trying to write matlab code to find the lines in chessboard
images. Here are the steps that I used:

1. RGB to intensity
[quote:2e7466f197]RGB = imread('chess_board.tif');
I= rgb2gray(RGB);
[/quote:2e7466f197]
2. edge detection
[quote:2e7466f197]BW = edge(I,'canny');
[/quote:2e7466f197]
3.Hough transform
[quote:2e7466f197][HT,T,R] = hough(BW);
[/quote:2e7466f197]
4. peak detection (for 20 peaks)
[quote:2e7466f197]P = houghpeaks(HT, 20, 'Threshold', mean(HT(Smile) );
[/quote:2e7466f197]
5.Line drawing
[quote:2e7466f197]custom function is used
[/quote:2e7466f197]
Here are the results:
http://picasaweb.google.com/Prudent.Programming/Chess_board

It seems that I need to do some preprocessing/post processing to
remove edges outside the chessboard. I am wondering if the image
processing gurus here could give some suggestions in this regard.
Thanks.
 
MEC...
Posted: Mon Oct 05, 2009 2:22 am
Guest
On Oct 4, 5:38 pm, magpie <prudent.programm... at (no spam) gmail.com> wrote:
[quote:1a7d271415]Hi,

I was trying to write matlab code to find the lines in chessboard
images. Here are the steps that I used:

1. RGB to intensity

RGB = imread('chess_board.tif');
I= rgb2gray(RGB);

2. edge detection

BW = edge(I,'canny');

3.Hough transform

[HT,T,R] = hough(BW);

4. peak detection (for 20 peaks)

P  = houghpeaks(HT, 20, 'Threshold', mean(HT(Smile) );

5.Line drawing

custom function is used

Here are the results:http://picasaweb.google.com/Prudent.Programming/Chess_board

It seems that I need to do some preprocessing/post processing to
remove edges outside the chessboard. I am wondering if the image
processing gurus here could give some suggestions in this regard.
Thanks.
[/quote:1a7d271415]
As a preprocessing step, try increasing the standard deviation of the
Gaussian mask of the canny edge detector (sigma parameter). As a
postprocessing step, try removing connected components smaller than a
threshold size T. You may not need both of these steps.
 
magpie...
Posted: Tue Oct 06, 2009 3:00 pm
Guest
On Oct 5, 8:22 am, MEC <emrecelebi1... at (no spam) gmail.com> wrote:
[quote:fda4efd9c5]On Oct 4, 5:38 pm, magpie <prudent.programm... at (no spam) gmail.com> wrote:





Hi,

I was trying to write matlab code to find the lines in chessboard
images. Here are the steps that I used:

1. RGB to intensity

RGB = imread('chess_board.tif');
I= rgb2gray(RGB);

2. edge detection

BW = edge(I,'canny');

3.Hough transform

[HT,T,R] = hough(BW);

4. peak detection (for 20 peaks)

P  = houghpeaks(HT, 20, 'Threshold', mean(HT(Smile) );

5.Linedrawing

custom function is used

Here are the results:http://picasaweb.google.com/Prudent.Programming/Chess_board

It seems that I need to do some preprocessing/post processing to
remove edges outside the chessboard. I am wondering if the image
processing gurus here could give some suggestions in this regard.
Thanks.

As a preprocessing step, try increasing the standard deviation of the
Gaussian mask of the canny edge detector (sigma parameter). As a
postprocessing step, try removing connected components smaller than a
threshold size T. You may not need both of these steps.- Hide quoted text -

- Show quoted text -
[/quote:fda4efd9c5]
I tried to use higher sigma in canny edge detector (>> BW = edge
(I,'canny',[], 1.7)), but it removed valid edge points from
chessboard. (result in http://picasaweb.google.com/Prudent.Programming/Chess_board#5389594778275907106
) Elimination by applying threshold on connected component size didn’t
help much, as the background forms really strong and long lines. Can
anyone suggest other pre-processing and/or post-processing method or
any better edge detection algorithm for this kind of chessboard
images? Thanks in advance.
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Fri Dec 04, 2009 9:40 pm