Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Label Contours

Hello,

I post this message because in need help with a project.

I have a binary image that containt object i want to detect ( obtained with a backgroundSubtractor)

Once detected,I want to give each object a label on an other image (the label Image). Then on the next image ( because i use a video ), I want to know which object has already been labeled using the last label image.

I use "findContours" to get all contours; my Question is : Is there any method or function that could help me to get all pixels of with a given value (for example 3 )? I would like a function like "cv::findNonZero " but more specified like "findNumberPixel".

Does a function like this exist or do i have to creat it by myself?

By waiting you answer i start to try create my own tools.

Thanking you in advance

[Solved] Label Contours

Hello,

I post this message because in need help with a project.

I have a binary image that containt object i want to detect ( obtained with a backgroundSubtractor)

Once detected,I want to give each object a label on an other image (the label Image). Then on the next image ( because i use a video ), I want to know which object has already been labeled using the last label image.

I use "findContours" to get all contours; contours;

my Question is : Is there any method or function that could help me to get all pixels of with a given value (for example 3 )? I would like a function like "cv::findNonZero " but more specified like "findNumberPixel".

Does a function like this exist or do i have to creat it by myself?

By waiting you answer i start to try create my own tools.

Thanking you in advance

Solution : (Thanks to LBerger ) Using InRange with all my values allows me to detect the label i want DrawContour with filled option allows me to draw my labels

[Solved] Label Contours

Hello,

I post this message because in need help with a project.

I have a binary image that containt object i want to detect ( obtained with a backgroundSubtractor)

Once detected,I want to give each object a label on an other image (the label Image). Then on the next image ( because i use a video ), I want to know which object has already been labeled using the last label image.

I use "findContours" to get all contours;

my Question is : Is there any method or function that could help me to get all pixels of with a given value (for example 3 )? I would like a function like "cv::findNonZero " but more specified like "findNumberPixel".

By waiting you answer i start to try create my own tools.

Thanking you in advance

Solution : (Thanks to LBerger ) Using InRange with all my values allows me to detect the label i want DrawContour with filled option allows me to draw my labels