필터 지우기
필터 지우기

i have a question about object detetion

조회 수: 2 (최근 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 CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by