推 carl0536: I(:,:,1)= double(logical(I(:,:,1)-0.5).*I(:,:,2)...) 04/02 15:41
推 carl0536: Ir = double(logical(logical(Ir-0.5)+logical(Ig-0.5)+ 04/02 15:44
→ carl0536: logical(Ib-0.5))) 04/02 15:45
→ carl0536: I(:,:,1) = 1-Ir 應該就是的灰色了的部分了 04/02 15:46
推 sunev: find(x(:,:,1)==x(:,:,2) & x(:,:,2)==x(:,:,3)) 04/02 15:49
→ hope2801: >> l=imread('??.tif'); 04/04 20:38
→ hope2801: >> for i=1:186, 04/04 20:38
→ hope2801: for j=1:230, 04/04 20:38
→ hope2801: if l(i,j,1)==l(i,j,2)&l(i,j,1)==l(i,j,3), 04/04 20:38
→ hope2801: l(i,j,1)=255; 04/04 20:38
→ hope2801: l(i,j,2)=0; 04/04 20:38
→ hope2801: l(i,j,3)=0; 04/04 20:38
→ hope2801: end 04/04 20:38
→ hope2801: end 04/04 20:38
→ hope2801: end 04/04 20:38
→ hope2801: >> imshow(l) 04/04 20:38
→ hope2801: 感謝上面兩位大大幫忙小弟我成功了以上是我成功的程式 04/04 20:39
推 carl0536: 提醒一下 在matlab裡面處理影像少用for 和if會比較快 04/04 20:52