edit-color detection
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a code for brown colour detection from that please tell how to detect for whit also,it shoul;d track both colour also,if brown colour is there it should trach it and even if white is there it should also track it
cform = makecform('srgb2lab');
J = applycform(I,cform);
%figure;imshow(J);
K=J(:,:,3);
%figure;imshow(K);
L=graythresh(J(:,:,3));
BW1=im2bw(J(:,:,3),L);
%figure;imshow(BW1);
M=graythresh(J(:,:,2));
%figure;imshow(J(:,:,2));
BW2=im2bw(J(:,:,2),M);
%figure;imshow(BW2);
O=BW1.*BW2;
% Bounding box
P=bwlabel(O,8);
BB=regionprops(P,'Boundingbox');
BB1=struct2cell(BB);
BB2=cell2mat(BB1);
[s1 s2]=size(BB2);
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Biomedical Imaging dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!