필터 지우기
필터 지우기

How can i get a bounding box around the vehicles and not around all the objects in the image

조회 수: 3 (최근 30일)
st = regionprops(bw_I, 'BoundingBox' );
for k= 1: length(st)
thisBB = st(k).BoundingBox;
rectangle('Position', [thisBB(1),thisBB(2),thisBB(3),thisBB(4)],...
'EdgeColor','g','LineWidth',2 )
end

답변 (1개)

Tarunbir Gambhir
Tarunbir Gambhir 2020년 12월 3일
If you just want to get a bounding box around the vehicles in this particular image, you could set constraints on the size of the bounding box. The bounding boxes for the background objects in this image are either too big or too small, and hence I think you could set some threshold by trial and error. Keep in mind that these constraints might or might not work with other similar images for vehicle detection.
If you want to automate the processes of getting bounding boxes around vehicles in multiple images, an algorithm or logic is required for the identification and detection of vehicles and background objects. Usually this task is performed by a trained Deep Learning model. After the identification of the vehicles in the image, bounding boxes can be formed around them.
If this is what you are trying to achieve, I suggest you go through the MATLAB example on training a vehicle detector.

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by