i have a question about object detetion

1 回表示 (過去 30 日間)
shabnam sh
shabnam sh 2019 年 1 月 13 日
回答済み: Rahul punk 2019 年 2 月 15 日
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

回答 (1 件)

Rahul punk
Rahul punk 2019 年 2 月 15 日

カテゴリ

Help Center および File ExchangeMATLAB Support Package for USB Webcams についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by