RECT and line detection
Message-ID:
Subject:
RECT and line detection
Date:Sun, 7 Sep 2008 11:00:27 +0100
Hello, I want to write a C/C++ program to detect rectangles in a possibly rotated image. I think I should first detect lines of the image using hough transform and then form rectangles. But I could not find a traight forward source code which gives line segments of an image. Can anybody help me? Thanks.
Message-ID:<01e39ff4-6073-4e44-b4bf-341659251f3f@t54g2000hsg.googlegroups.com>
Subject:
Re: RECT and line detection
Date:Sun, 7 Sep 2008 18:00:12 +0100
On Sep 7, 6:00=A0am, Alirezawrote: > Hello, > I want to write a C/C++ program to detect rectangles in a possibly > rotated image. > I think I should first detect lines of the image using hough transform > and then form rectangles. But I could not find a traight forward > source code which gives line segments of an image. Can anybody help > me? > Thanks. You might do a web search for "Harris Corner Detect*" Regards ImageAnalyst
Message-ID:<90c6b11b-1af2-4050-9c5b-abb567cb8434@x41g2000hsb.googlegroups.com>
Subject:
Re: RECT and line detection
Date:Tue, 9 Sep 2008 16:40:14 +0100
On 7 Set, 11:00, Alirezawrote: > Hello, > I want to write a C/C++ program to detect rectangles in a possibly > rotated image. > I think I should first detect lines of the image using hough transform > and then form rectangles. But I could not find a traight forward > source code which gives line segments of an image. Can anybody help > me? > Thanks. Hi, You can do: 1- Segment the foreground from background using a filter (obtaining a binary image); 2- Flood-fill the rectangle to obtain the object completed filled 3- Detect vertices using a bounding box Best regards, Tiago
Message-ID:<6f07bcfc-f793-47ab-b701-3d742b0f6bf9@73g2000hsx.googlegroups.com>
Subject:
Re: RECT and line detection
Date:Tue, 9 Sep 2008 19:31:02 +0100
On Sep 9, 11:40=A0am, tiagowrote: > On 7 Set, 11:00, Alireza wrote: > > > Hello, > > I want to write a C/C++ program to detect rectangles in a possibly > > rotated image. > > I think I should first detect lines of the image using hough transform > > and then form rectangles. But I could not find a traight forward > > source code which gives line segments of an image. Can anybody help > > me? > > Thanks. > > Hi, > > You can do: > 1- Segment the foreground from background using a filter (obtaining a > binary image); > 2- Flood-fill the rectangle to obtain the object completed filled > 3- Detect vertices using a bounding box > > Best regards, > Tiago ------------------------------------------------ May or may not work depending on the image. For example, it wouldn't work to find all the rectangles that are possible in an aerial photo of a downtown area, such as Manhattan where you can't get solid rectangles. For example, how many rectangles are there in a chessboard? We all know it's many, many more than 64! There's probably hundreds if not thousands. (Actually since each corner can be a corner of a rectangle, it's 64*64 / 2 minus the number of null area rectangles, about 81 of those) In such cases, there would be numerous rectangles, most of them overlapping and you couldn't get such a binary image. This method would work well for isolated, non overlapping rectangles. Unfortunately the original poster didn't give enough information (as usual) or post an image so we don't know what he/she's talking about and doesn't seem interested enough to come back and check answers to his/her question. Regards, ImageAnalyst
Message-ID:<3ee8856a-994d-4524-865c-0f710d28745e@2g2000hsn.googlegroups.com>
Subject:
Re: RECT and line detection
Date:Wed, 10 Sep 2008 09:20:26 +0100
On Sep 9, 8:31=A0pm, ImageAnalystwrote: > Unfortunately the original poster didn't give > enough information (as usual) or post an image so we don't know what > he/she's talking about and doesn't seem interested enough to come back > and check answers to his/her question. > Regards, > ImageAnalyst Worse, the problem is meaningless. There are no 'rectangles' in images because there are no 'rectangles' in the world. The word 'rectangle' first has to be defined here even to have a problem to solve. I think the first course any image processor should take is 'Scientific and engineering methodology 101'. illywhacker;



RSS News Feed