From: Giovanni Azua on
Hello,

Can anyone give me a suggestion how to scatter plot a color image in 3d
(three color channels), my idea is to try to show the natural correlation
between the color channels and later draw the plane that points through the
direction of maximum variance (eigenvector corresponding to the highest
eigenvalue as result of doing PCA decomposition). I have tried the following
already:

I = imread('colorimage.png');
I = double(I) / 255;
plot3(I(:,:,1), I(:,:,2), I(:,:,3));

but takes forever and the result looks somewhat flat.

Many thanks in advance,
Best regards,
Giovanni

From: Walter Roberson on
Giovanni Azua wrote:

> Can anyone give me a suggestion how to scatter plot a color image in 3d
> (three color channels),

> I = imread('colorimage.png');
> I = double(I) / 255;
> plot3(I(:,:,1), I(:,:,2), I(:,:,3));
>
> but takes forever and the result looks somewhat flat.

scatter3() instead of plot3().

Note: you do not need to convert to double before doing the scatter plot
-- you can set the tick labels instead.