Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

Now I want to find the contours of the individual blobs.

Does anyone know of such an algorithm? Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

Now I want find it convenient to find use these point vectors when sorting out which blob to use. But once I sort out the contours of appropriate object, I need to perform stuff like circularity measurements. Thus the individual blobs. need for contours.

Does anyone know Is there an algorithm for finding the contour in a vector of such an algorithm? points? Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

I find it convenient to use these point vectors when sorting out which blob to use. But once I sort out the appropriate object, I need to perform stuff like circularity measurements. Thus the need for contours.

Is there an algorithm for finding the contour in a vector of points? points?

Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

I find it convenient to use these point vectors when sorting out which blob to use. But once I sort out the appropriate object, I need to perform stuff like circularity measurements. Thus the need for contours.

Is there an algorithm for finding the contour in a vector of points?

Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

EDIT

One way of doing it is:

  • Threshold image
  • Use a connected_components class to separate individual blobs
  • Perform canny on the thresholded image
  • Find the edges
  • Decide what set of connectedcomponents we want
  • Find the contours associated with that set of connected pixels

What I would rather do is

  • Threshold image
  • Use a connectedcomponents class to store individual sets of connected pixels as points
  • Decide what set of connected pixels to use
  • Find the edges of that single set.

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

I find it convenient to use these point vectors when sorting out which blob to use. But once I sort out the appropriate object, I need to perform stuff like circularity measurements. Thus the need for contours.

Is there an algorithm for finding the contour in a vector of points?

Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

EDIT

One way of doing it is:

  • Threshold image
  • Use a connected_components class to separate individual blobs
  • Perform canny on the thresholded image
  • Find the edges
  • Map contours with the different sets of connected pixels
  • Decide what set set(s) of connectedcomponents we want
  • Find the contours associated with that set of connected pixels

What I would rather do is

  • Threshold image
  • Use a connectedcomponents class to store individual sets of connected pixels as points
  • Decide what set set(s) of connected pixels to use
  • Find the edges of that single set.

Finding contours in vector of connected points

Hi!

I use a class called ConnectedComponents to split a binary image into vectors of connected points (Point2i).

I find it convenient to use these point vectors when sorting out which blob to use. But once I sort out the appropriate object, I need to perform stuff like circularity measurements. Thus the need for contours.

Is there an algorithm for finding the contour in a vector of points?

Would it be less taxing to convert the point vector to a mat, perform canny and then findContours?

EDIT

One way of doing it is:

  • Threshold image
  • Use a connected_components connectedcomponents class to separate store individual blobssets of connected pixels as points
  • Perform canny on the thresholded image
  • Find the edges
  • Map contours with the different sets of connected pixels
  • Decide what set(s) of connectedcomponents we want

What I would rather do is

  • Threshold image
  • Use a connectedcomponents class to store individual sets of connected pixels as points
  • Decide what set(s) of connected pixels to use
  • Find the edges of that single set.