detect yellow fiducials in an image
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I been work in code able to determine yellow fiducials in picture
I used RGB color ratio so I can detect them and then I set Thresholds for every ratio I used and and I comined them in one picture so I get black and white picture)
the problom is that every time I changed the picture I got clean picture with the fiducials only, and sometime I got picture with a lot of other stuff.
is there any way to get rid of them by using techniques or other color filliter.
Im= imread('39inch.jpg');
I_Red= Im(:,:,1);
I_Green= Im(:,:,2);
I_Blue= Im(:,:,3);
rb_ratio=double(I_Red)./double(I_Blue);
gb_ratio=double(I_Green)./double(I_Blue);
thr_rb=imbinarize(rb_ratio,1.45);
thr_gb=imbinarize(gb_ratio,1.35);
g_bin= (thr_gb & thr_rb);
BlackAndWhite=bwareaopen(g_bin,150);
bboxes=regionprops('table',BlackAndWhite,'BoundingBox');
bb=bwareaopen(d_bin,70);
subplot(2,2,1), imshow(thr_gb);
title ('gb_ratio')
subplot(2,2,2), imshow(thr_rb);
title ('rb_ratio')
subplot(2,2,3), imshow(BlackAndWhite);
title ('BlackAndWhite')
subplot(2,2,4), imshow(bb);
title ('ratio')
and here is the clean result
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209330/image.png)
unclear result
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/209331/image.png)
0 commentaires
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!