Demo entry 6356677

1

   

Submitted by 1 on Apr 20, 2017 at 05:17
Language: Matlab. Code size: 192 Bytes.

%提取特定颜色
rgb=im2double(imread('2.jpg'));

ycbcr=rgb2ycbcr(rgb);
cr=ycbcr(:,:,3);
mask1_r=cr>.65;  %阈值


%缺省拟合部分



%寻找二值图等于0的像素坐标(等于0即为白色,等于1即为黑色)
[x,y]=find(mask1_r==1);
B=[x,y];

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).