J
J
Julia2018-01-11 16:16:01
C++ / C#
Julia, 2018-01-11 16:16:01

How to define points in an image using Region Growing?

Hello,
I have a cv::Mat where some areas (circles) have a value of 0. With the help of an ordinary iteration, I find 0, then look for neighbors with a value of zero, and so on, while writing the appropriate coordinates in a vector . Then I already find points on the border, like a border.
What ready-made functions of opencv or other libraries can help me speed up the process.
Thanks for the help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2018-01-12
@D3Nd3R

You can immediately look for boundaries.
1. cv::Canny. Method for finding boundaries.
2. cv::findContours. finds the contours and saves them to a vector
And then, by analyzing the contours, you can remove the excess...

A
Alexander Taratin, 2018-01-15
@Taraflex

To find circles, you can use
https://www.pyimagesearch.com/2016/02/08/opencv-sh...
there is python, but in c++ the same api will be used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question