Hello everyone can someone explain to me why this code is not working for skin segmentation , Im trying to apply a bounding box jsut for skin region but looks that the whole image is in an bounding box
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clc
clear
close all
warning off
c=webcam;
faceDetector = vision.CascadeObjectDetector;
while true
e=c.snapshot;
mkdir=createMask(e);
mkdir=imfill(mkdir,'holes');
mkdir=bwareafilt(mkdir,3);
labeledImage = bwlabel(mkdir);
measurements = regionprops(labeledImage,'BoundingBox'); %#ok<MRPBW>
subplot(1,2,1);
imshow(e);
subplot(1,2,2);
imshow(e);
hold on;
for k = 1 : length(measurements)
thisBB = measurements(k).BoundingBox;rectangle('Position', [thisBB(1),thisBB(2),thisBB(3),thisBB(4)],...
'EdgeColor','b','LineWidth',5 )
end
hold off
end
using the createmask with my skin colour

0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Computer Vision Toolbox 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!