filmov
tv
Tracking object of particular color with complete code | Digital Image Processing | MATLAB
Показать описание
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
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
Комментарии