Finding pixel numbers for certain colors
Ältere Kommentare anzeigen
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 Kommentare
Image Analyst
am 13 Sep. 2023
Bearbeitet: Image Analyst
am 13 Sep. 2023
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



