How to separate pixels with same RGB value in cell array?
Mostrar comentarios más antiguos
I have an image "example" with different RGB color values. I have identified the RGB values of each pixel and have stored the coordinates, called x and y, in cell arrays of different sizes. I need to find the center of each shape that is created by pixels with a certain RGB value. By storing the values in cells I know how many pixels belong to a certain color area and I can take the mean of the coordinates.
However, one of the RGB values occurs twice in the image, in shapes that are not connected. This means that the center point is not correct. Can my current method be changed so I can correctly identify the center point of both the shapes?
Any help or suggestion will be appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Agriculture en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
