List coordinates of single colored contiguous areas of image

23 Views Asked by At

I am looking for an implementation of an algorithm that takes an image file - eg png, a colour as inputs and outputs a list of coordinates of contiguous regions in the image.

One coordinate would match a region's pixel that is the same colour as defined in the input.

I just don't want to reinvent the wheel if someone has already solved this problem. I have a hunch it has been resolved by someone already. I have just failed to find it.

Regards

1

There are 1 best solutions below

0
Christoph Rackwitz On

You need cv::inRange() and cv::connectedComponents(), maybe cv::findContours()

Please take a course on image processing. You know the term already. Questions like this are answered by formal education.