How to determine if a contour is closed?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to determine if a contour is closed?

Neelz On Wheelz
Hello,

does anybody know how to determine whether a retrieved contour is closed
or not? I already tried  to use the "CV_SEQ_FLAG_CLOSED" flag in the
following way:

(contour->flags & CV_SEQ_FLAG_CLOSED)

it shut be "1" if it is closed and "0" if not, but it always returns
"4096". I tried some other flags like "CV_SEQ_FLAG_HOLE", but only
"CV_SEQ_FLAG_CLOSED" isn't working. Does anybody have a clue how to
solve that problem? Is there another way to check a contour?

Thanks a lot

Nils

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing [hidden email]
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/OpenCV/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/OpenCV/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply | Threaded
Open this post in threaded view
|

Re: How to determine if a contour is closed?

Jean-Pierre Landry
CV_SEQ_FLAG_CLOSED being equal to 4096, you should obtain 4096 for closed
contours and 0 otherwise if this flag is set properly... (never used
it...)






Neelz On Wheelz <[hidden email]>
Sent by: [hidden email]
2009-01-05 07:36
Please respond to
[hidden email]


To
[hidden email]
cc

Subject
[OpenCV] How to determine if a contour is closed?






Hello,

does anybody know how to determine whether a retrieved contour is closed
or not? I already tried  to use the "CV_SEQ_FLAG_CLOSED" flag in the
following way:

(contour->flags & CV_SEQ_FLAG_CLOSED)

it shut be "1" if it is closed and "0" if not, but it always returns
"4096". I tried some other flags like "CV_SEQ_FLAG_HOLE", but only
"CV_SEQ_FLAG_CLOSED" isn't working. Does anybody have a clue how to
solve that problem? Is there another way to check a contour?

Thanks a lot

Nils

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing
[hidden email]
Yahoo! Groups Links






[Non-text portions of this message have been removed]