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 (최근 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개)

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by