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 中查找有关 Display 2-D Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



