How to separate pixels with same RGB value in cell array?
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Agriculture についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
