Tracking object of particular color with complete code | Digital Image Processing | MATLAB

preview_player
Показать описание
Algorithm:
Step 1:
The central part is color detection , for details , check this video--
Colour Detection Using Matlab from Scratch
Step 2:
Draw a rectangular area using binary image whatever you are getting after colour detection & put that in the original colour image.

Main Code(createMask function can be generated using Color Thresholder easily , discussed earlier in detail):

clc
clear all
close all
warning off
c=webcam;
while true
mkdir=createMask(e);
mkdir=imfill(mkdir,'holes');
mkdir=bwareaopen(mkdir,20);
labeledImage = bwlabel(mkdir);
measurements = regionprops(labeledImage, 'BoundingBox', 'Area');
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
drawnow;
hold off;
end

Learn Complete Machine Learning & Data Science using MATLAB:

Learn Digital Signal Processing using MATLAB:

Learn Complete Image Processing & Computer Vision using MATLAB:

🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL

#DigitalImageProcessing #MATLAB #ComputerVision
Рекомендации по теме
Комментарии
Автор

Bro keep it up
i have came through ur YouTube channel for me its very useful...

druvateja
Автор

Can you show how to detect edge of box and find it orientation angle?

farhanafadzli
Автор

Can I make multiple colored objects using different createMask command? By the way, all of his videos are really high quality.

Автор

request detection of smoking people, sir

junaidysitumeang
Автор

thanx for posting this video
can anyone explain why step 2 is needed or what does it do?

fatemezahraamirhoseini