Code:
clc
close all
warning off
mycam=ipcam('http://192.168.1.101:8080/video');
while true
e=mycam.snapshot;
imshow(e);
ms=rgb2gray(e);
[BW,maskedImage] = segmentImage(ms);
filta=imfill(imdilate(bwareaopen(BW,300),ones(5,5)),'holes');
[a b]=bwlabel(filta,8);
mesurements=regionprops(a,'BoundingBox');
imshow(e);
hold on;
for k=1:length(mesurements)
thisBB=mesurements(k).BoundingBox;
rectangle('Position',[thisBB(1),thisBB(2),thisBB(3),thisBB(4)] ,...
'EdgeColor','r','LineWidth',2);
end
title(b);
hold off;
drawnow;
end
Learn Digital Signal Processing using MATLAB:
https://www.youtube.com/playlist?list=PLjfRmoYoxpNr3w6baU91ZM6QL0obULPig
Learn Complete Machine Learning & Data Science using MATLAB:
https://www.youtube.com/playlist?list=PLjfRmoYoxpNoaZmR2OTVrh-72YzLZBlJ2
Learn Complete Image Processing & Computer Vision using MATLAB:
https://www.youtube.com/playlist?list=PLjfRmoYoxpNostbIaNSpzJr06mDb6qAJ0
ππππππππ
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
#MATLAB #DigitalmageProcessing #MachineLearning #DataScience #ComputerVision