How to Retrieve Specific points from contourfind function? [closed]

asked 2014-10-16 07:22:16 -0600

Arjun gravatar image

updated 2017-03-10 02:54:51 -0600

Hello All,

I am using Findcontour and drawcontour for contour Processing.The output array of findcontour function contains 4 adjacent points on Top Left corner of contour.I want All the points contained in contour,so I can retrieve specific points(Extreme Points)from it.Does anybody know,what is the method to achieve this?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-10 14:07:44.195154

Comments

1

maybe some drawing helps

berak gravatar imageberak ( 2014-10-16 07:33:21 -0600 )edit

I am not sure, but do you want this?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-10-16 08:35:53 -0600 )edit

Thanks. I have tried this.Whether I use CHAIN_APPROX_NONE or CHAIN_APPROX_SIMPLE,in both case I get only 4 Adjacent Points.I have used the function as this: findContours(ContourImg, contours, // a vector of contours CV_RETR_EXTERNAL, // retrieve the external contours CV_CHAIN_APPROX_NONE); // all pixels of each contours Do I need to change any parameters to get all the points(or extreme points)? Is there anything wrong with this? or any other method to be used?

Arjun gravatar imageArjun ( 2014-10-17 02:01:56 -0600 )edit

Ok, it's way too far to understand what you want, can you please add some photos of the case (or a similar one) and what you get and what you want?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-10-17 02:14:58 -0600 )edit

Do I understand it correctly that you want every single point of your contour and then locate some interesting points for you? If so add the figure that yields only 4 points when using CHAIN_APPROX_NONE because this one should add all points that differ in both x and y direction.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-17 04:05:48 -0600 )edit