Finding under vehicle undefined object - inspection system

Hi all,
There are 2 images of a under vehicle recorded with a fisheye lens. How can I detect the undefined object in the 2nd image using the main image (1st image) in Matlab ? In the 2nd image, as I have marked in red, I need to locate the undefined object.
Thanks in advance.

回答 (1 件)

Image Analyst
Image Analyst 2020 年 3 月 5 日

0 投票

If the images are of the same size, and of the same magnification and fairly well aligned (a doubtful scenario in a real world situation) then you can subtract the images and look for blobs of non-zero. Untested code:
% Get the difference image.
diffImage = imabsdiff(double(image1), double(image2));
% Get the max in any of the color channels
diffImage = max(diffImage, [], 3);
% Threshold to find significant differences.
mask = diffImage > 5; % or some value.
% Throw out any blobs less than 50 pixels in size (they're noise).
mask = bwareaopen(mask, 50);
imshow(mask);
% Make measurements of area and centroid.
props = regionprops(mask, 'Area', 'Centroid');
allAreas = [props.Area]
centroids = vertcat(props.Centroid)

2 件のコメント

mehmet irfan gedik
mehmet irfan gedik 2020 年 3 月 5 日
The situation for the real world are a bit challenging as you said. Actually the images are not the same size (1st image- 2655x1024x3 and 2nd image- 2771x1024x3), and they're actually not exactly aligned and the last problem is that distortionCenter isn't exactly in the same location. I've been thinking about what I really need to do for a while.
Image Analyst
Image Analyst 2020 年 3 月 5 日
Try imresize() and imregister() to align them. If the differences are big then registration may not be necessary, though for tiny differences it would be.

この質問は閉じられています。

質問済み:

2020 年 3 月 5 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by