Skip to main content

How can I detect a rectangle?

3 replies [Last post]
jsda
Offline
Joined: 2008-08-21

I have an image which contains a rectangle, how can i detect it?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Rafael Santos

> I have an image which contains a rectangle, how can i detect it?
>
There are several methods, as far as I know none implemented in JAI.
It depends on whether you know the dimensions/orientation of the
rectangle, whether there are more objects on the image, whether you want
to detect ALL rectangles on an image, whether they are parallel to the
image axes, etc.

Two well known methods are the Hough Transform and Template Matching.
There are also several methods based on Fuzzy C-Shells clustering.

Rafael

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net

jsda
Offline
Joined: 2008-08-21

It's possible that there are more than one rectangle, I want
to detect all and every orientation is possible,
do you know a lib that implements such an algorithm?

Message was edited by: jsda

Rafael Santos

No libs I know, although you may check openCV.
If you want to roll your own, please check the Fuzzy C-Shell variant
algorithms -- there are books by James Bezdek and others by Witold
Pedrycz that may have high-level description of the algorithms.

Sorry, I'm out of the office and cannot give more precise descriptions.

Rafael

> It's possible that there are more than one rectangle, I want
> to detect all and any orientation is possible,
> do you know a lib that implements such an algorithm?
> [Message sent by forum member 'jsda' (JanSDahlke@web.de)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386774
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
For additional commands, e-mail: interest-help@jai.dev.java.net