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
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!