Effacer les filtres
Effacer les filtres

i have a question about object detetion

2 vues (au cours des 30 derniers jours)
shabnam sh
shabnam sh le 13 Jan 2019
hi everyone ,
i am working on a project regarding detetion of road signs using image processing approaches ,
this is the code i am working on , i wan to find the white object in the right corner of the image . i have attached my out put and also original image .would you please help me how to remove unwanted regions ?like sky and cars
img = imread ('2024.bmp');
r = img (:,:,1);
g = img (:,:,2);
b = img (:,:,3);
white1 = roicolor(r,180, 255);
white2 =roicolor(g, 180, 255);
white3 = roicolor(b, 180,255);
output = white1.*white2.*white3;
% output=medfilt2(output,[3 3]);
output=im2bw(output,0.5);
output=bwareaopen(output,250);
figure
imshow (output)
bw = bwlabel(output,8);
figure
imshow (bw)
stats = regionprops(output,'Area','BoundingBox','Centroid');
imshow(img)
hold on
for object=1:length(stats)
bb=stats(object).BoundingBox;
bc=stats(object).Centroid;
rectangle('Position',bb,'EdgeColor','Y','LineWidth',2);
plot(bc(1),bc(2),'-m+');
a=text(bc(1)+15,bc(2), strcat('X:', num2str(round(bc(1))), 'Y:', num2str(round(bc(2)))));
set(a, 'FontName', 'Arial', 'FontWeight', 'bold', 'FontSize', 12, 'Color', 'green');
end

Réponses (1)

Rahul punk
Rahul punk le 15 Fév 2019

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by