看板 MATLAB 關於我們 聯絡資訊
※ 引述《xysyme (chiamin)》之銘言: : 怎麼用matlab讀一張圖進來 : 是用 open('T1.JPG') 嗎? : 又如何把圖中的某一個顏色分類出來阿? : 謝謝大家m(=_=)m 兩種方式給你參考。 %1 img = imread('onion.png'); a1 = img(:,:,1); a2 = img(:,:,2); a3 = img(:,:,3); subplot(2,2,1);imshow(img); subplot(2,2,2);imshow(a1); subplot(2,2,3);imshow(a2); subplot(2,2,4);imshow(a3); %2 img = imread('peppers.png'); a1 = img;a1(:,:,2:3) = 0; a2 = img;a2(:,:,[1 3]) = 0; a3 = img;a3(:,:,1:2) = 0; subplot(2,2,1);imshow(img); subplot(2,2,2);imshow(a1); subplot(2,2,3);imshow(a2); subplot(2,2,4);imshow(a3); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.85.122.35
xysyme:謝謝你!! 140.116.120.10 02/15