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 visualizzazioni (ultimi 30 giorni)
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

Risposte (0)

Categorie

Scopri di più su Image Processing and Computer Vision in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by