Ask Your Question

To obtain Regular/Smooth Shape

asked 2018-04-16 06:12:42 -0600

dursunsefa gravatar image

Hello , I'm working on real-time shape recognition. Here is the output at the last point I came after pre-processing:

image description

(The small objects is not problem)

Another output :

image description

(The upper right shape is rectangle)

My question is : How do I make the shapes in image look more regular? (NOTE: morphology applied shapes)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-04-16 13:07:31 -0600

matman gravatar image

If you deal with contours, take a look at approxPolyDP

edit flag offensive delete link more


I have some C++ code that uses approxPolyDP:

I manually draw the contours using the line function, instead of calling drawContours, for fun.

sjhalayka gravatar imagesjhalayka ( 2018-04-16 18:46:30 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-04-16 06:12:42 -0600

Seen: 21 times

Last updated: Apr 16