Re: [問題] 我想問的是...

看板MATLAB作者 (撥泥)時間19年前 (2005/02/14 23:02), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
※ 引述《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

140.116.120.10 02/15, , 1F
謝謝你!!
140.116.120.10 02/15, 1F
文章代碼(AID): #124Bs5mQ (MATLAB)
文章代碼(AID): #124Bs5mQ (MATLAB)