Ask Your Question
1

discretization

asked Feb 1 '13

meenagkm gravatar image

updated Feb 1 '13

Haris gravatar image

I want to discretize a contour which was drawn manually in an image. could anyone help me to code this.

Preview: (hide)

2 answers

Sort by » oldest newest most voted
1

answered Feb 1 '13

In the first, preprocessing your image & extract contour then discretize the contour by approxPolyDP() function.

Preview: (hide)
1

answered Feb 1 '13

Michael Burdinov gravatar image

There nothing continuous in image so anything drawn in it is already discrete.

If you need to find polygon for this drawn contour you can use findContours function. Note that last parameter is method that may be used for simplification of extracted contour, so you can control discretization level.

Or if you already has the polygon and only want to simplify it you can use approxPolyDP function.

Preview: (hide)

Question Tools

Stats

Asked: Feb 1 '13

Seen: 852 times

Last updated: Feb 01 '13