rgb = imread('C:\Users\Administrator\Desktop\test_image\test1.jpg');
% rgb = rgb2lab(rgb);
% rgb = rgb2xyz(rgb);
% rgb = imread('C:\Users\Administrator\Desktop\test_image\SA14001010.jpg');
% cform = makecform('srgb2lab');
% lab = applycform(rgb,cform);
name_rgb = {'Red', 'Green','Blue' }
% (0) = 'Red';
% name_rgb(1) = ;
% name_rgb(2) = ;
mycol = size(rgb, 1);
myrow = size(rgb, 2);
% rgb(1, 1, :)
reshaped_rgb = reshape(rgb, [1, mycol*myrow, 3]);
squeezed_rgb = squeeze(reshaped_rgb)';
% size(t)
% , )
% color(1,:) = [changed_rgb()]
% size(t(1,:))
% size(t')
% C = colormap('default');
% x = t(1,:);
% y = t(2,:);
% z = t(3,:);
% S =
% S = repmat([50,25,10],numel(x),1);
% c = 50 * ones(1, numel(x));
% s = S(:);
% size(s)
% tt = (t);
scatter3(squeezed_rgb(1,:), squeezed_rgb(2,:), squeezed_rgb(3,:), 50, squeezed_rgb(3,:))
% , im2double(squeezed_rgb)'
% scatter3(changed_rgb(:,:,1), changed_rgb(:,:,2), changed_rgb(:,:,3))
% colorbar
%changed_rgb(1,1,:)
figure;imshow(rgb); title(name_rgb(1));
% for i=1:3
% tmp = size(rgb)
% changed_rgb(:,:,1) = zeros(mycol, myrow);
% changed_rgb(:,:,2) = zeros(mycol, myrow);
% changed_rgb(:,:,3) = zeros(mycol, myrow);
% size(changed_rgb);
% changed_rgb(:,:,i) = rgb(:,:,i);
% figure;imshow(changed_rgb); title(name_rgb(i));
% % figure;imshow(rgb(:,:,i)); title(name_rgb(i));
% end
%
matlab 图片像素 三维空间散点图
最新推荐文章于 2023-03-03 12:07:40 发布