P
P
p4p2021-10-29 14:23:15
Image processing
p4p, 2021-10-29 14:23:15

How to determine the centers of zones of certain colors in an image?

We have an image filled with different colors and separated by black borders. We need to determine the center of each zone. The most economical algorithm is needed and libraries cannot be used to work with images. In the arsenal, only getting the pixels of the image as an array:

617bd85fe3f06891944490.png
we also need to take into account that we will need to know the x \ y position of the pixel in the image.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question