imread -> colorcloud() : points are too small?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm new to Matlab and struggling with imread() and scatter3() which offers options for 'marker size'.
But there are 'complications'... My goal is to load an RGB image (using imread) and then plot the image colors in 3D using the original RGB pixels values.
So far, I got this code working which produces a 'monochromatic' (blue) 3D plot :
RGB = imread("Bonnet.jpg")
[R,G,B] = imsplit(RGB);
scatter3(R(:), G(:), B(:))
I tried experimenting with 'scatter3(X,Y,Z,S,C) draws each circle with the color specified by C' where C is a three column matrix with the number of rows in C equal to the length of X, Y, and Z, then each row of C specifies an RGB color value for the corresponding circle...
Trouble is I can't find how to convert the RGB 'array' into a 3x3 matrix to supply as c argument?
That is why I was interested in colorcloud() since it automatically colors each points BUT there are no options to increase the points size... So back to square one...
----
Once I get past this 'hurdle', my next goal is to allow 'picking' points (filled circles or squares) with the mouse so that I can tell what the RGB coordinate of a mouseover or mouse click is.
Then, for the cherry on the icing, I'd like to create a wireframe from a separate 3D dataset (extracted from Output ICC profile) to allow viewing which colors are out-of-gamut.
Tall order!
Any help is appreciated / Roger
0 Commenti
Risposte (2)
Walter Roberson
il 14 Dic 2021
Modificato: Walter Roberson
il 14 Dic 2021
filename = "yellowlily.jpg";
RGB = imread(filename);
[R,G,B] = imsplit(RGB);
pointsize = 25;
scatter3(R(:), G(:), B(:), pointsize, rescale([R(:), G(:), B(:)])); axis equal
7 Commenti
Image Analyst
il 14 Dic 2021
"my next goal is to allow 'picking' points (filled circles or squares) with the mouse so that I can tell what the RGB coordinate of a mouseover or mouse click is."
So after you call imshow(), just call impixelinfo to do that. It will show you the (x,y) and RGB of the pixel your mouse is over
imshow(rgbImage);
impixelinfo;
It works for a displayed color or gray scale image, not for the colorcloud or scatter3 plots.
1 Commento
Vedere anche
Categorie
Scopri di più su Orange in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!