Car logo extraction and recognition using image processing

10 ビュー (過去 30 日間)
Image Learner
Image Learner 2021 年 12 月 21 日
コメント済み: Image Analyst 2021 年 12 月 21 日
Hi everyone, I want to extract the logo from any car then compare it with template. the logo can be in front or back.
I'm trying to extract the logo using edge detection then compare it with template.
im=imread('download.jfif');
imgray=rgb2gray(im);
medianFilteredImage = medfilt2(imgray, [3 3]);
noiseImage = (imgray == 0 | imgray == 255);
noiseFreeImage = imgray; % Initialize
noiseFreeImage(noiseImage) = medianFilteredImage(noiseImage); % Replace.
imshow(noiseFreeImage);
imgray = noiseFreeImage;
imbin=imbinarize(imgray);
figure, imshow(imbin)
im=edge(imgray,"canny");
%se = strel('disk',40);
%erode = imerode(im,se);
%figure
%imshow(erode)
Iprops=regionprops(im,"BoundingBox","Area","Image");
area=Iprops.Area;
count=numel(Iprops);
max=area;
boundingbox=Iprops.BoundingBox;
for i=1:count
if max<Iprops(i).Area
max=Iprops(i).Area;
boundingbox=Iprops(i).BoundingBox;
end
end
im=imcrop(imbin,boundingbox);
im=bwareaopen(~im,50);
im=imcomplement(im);
binary=bwlabel(binaryImage,8);
imshow(binary)
I'm new to matlab and image processing and i did not find anything that can help me

回答 (1 件)

Image Analyst
Image Analyst 2021 年 12 月 21 日
No, that's not going to work. There are so many edges in that image, or any other images of cars, that hoping to find out which edge is the logo is doomed to failure.
In my opinion you'd be best off using deep learning (transfer learning) to train a network to classify/find logos. Look for a demo on the Mathworks site where they use alexnet and retrained it to find something different.
  2 件のコメント
Image Learner
Image Learner 2021 年 12 月 21 日
Unfortunately, I have to use Image Processing. so can I use thresholding or anything that can help?
Image Analyst
Image Analyst 2021 年 12 月 21 日

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by