find spatial coordinates (x,y) for a pixel value in color image? (Opposite of impixel function)
Ältere Kommentare anzeigen
I have a color image with 2 circle (one with red, one with blue i.e. I know the pixel value of these two component). I need to extract (x,y) coordinates of the areas covered by this two color. The opposite is done by IMPIXEL function e.g. for a known (x,y), impixel will give us PIXEL value of that location. But, in my case, I need (n*2) matrix of (x,y) spatial coordinates of known pixel values (the colored components). Any suggestion?
I am thinking about
1.
conn_c = bwconncomp(colored_image);
PixelListTo = regionprops(conn_c,'PixelList');
I did that for binary image. In current case, I need to input two different color which is not possible in bwconncomp.
2. IMPROFILE will give me (x,y) for defined endpoints of line segment, is there any way to put pixel value so that (x,y) coordinate for that pixel value (can be multiple points) can be obtained.
2 Kommentare
Tanmoy
am 29 Mai 2015
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Region and Image Properties finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

