Finding pixel numbers for certain colors
古いコメントを表示
Hi,
I want to be able to find which pixels are red which pixels are blue but with an extra issue. If a pixel is at the margin between red and blue, I want to find those pixels and group those pixels with any pixel that is two pixels away from it. I am attaching both the image I am working on and the one explaining the pixel issue. For the circled pixel in the image 'pixel selection', I need the pixel numbers of other marked ones. In the end since there will be coinciding pixel numbers (when it is applied for all pixels at the red-blue interface) I will eliminate the repeating ones directly. In the end I only need the pixel numbers for red, blue and red-blue interface.
Thanks in advance.
2 件のコメント
Image Analyst
2023 年 9 月 13 日
編集済み: Image Analyst
2023 年 9 月 13 日
Not sure of your definition of "pixel numbers" or "coinciding pixel numbers". Do you want the RGB histogram ( a count of the numbers of pixels with each unique color)?
The goal as described seems to be a list of the indices (or subscripts) of the 24 pixels surrounding each pixel in the transition area. That is, for subscripts, a big 600x1000x24x2 array (or some equivalent shape). How that would be used, I don't know.
That seems pretty questionable to me, so I'm just waiting to see if and why the direct use of the masks won't suffice.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



