How to Retrieve Specific points from contourfind function? [closed]
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?
maybe some drawing helps
I am not sure, but do you want this?
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?
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?
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.