3

我的任务是在照片中找到徽标图像。我需要找到标志并计算它的透视变形(标志在塑料卡上)。

教科书中的经典方法是使用 SURF。不幸的是,SURF 在这里有几个缺点:

1)logo图片的特征比较少,在大图中很难找到(实际效果好像很低)

2)标志图像有非常显着的着色,SURF没有使用

我的问题是:

1)在大图片中寻找小扭曲图像的任务的正确名称是什么?

2)除了SURF特征匹配之外,这个任务有什么方法吗?

例如,我可以想象许多扭曲的徽标图像样本,以不同的分辨率数字化。我认为如果我开始以低分辨率进行查找,我可以及早过滤掉不好的假设。逐渐提高分辨率,我可以同时匹配图像并确定它的投影参数。

某些方法是否类似于这种方法?

4

1 回答 1

3

你试过MSER 算法吗?它对我来说总是很好。

---标准答案结束,只有在您有时间并喜欢玩图像处理时才继续---

此外,在搜索面积相对较小的模板时,我开发了一种方法来使用模板的稳定极值区域 (SER) 来映射扫描区域,以获得另一种更强大/资源密集型的算法。这种方法非常容易实施,并且在我的上一个项目中创造了奇迹。如果您有兴趣,实现如下(MatLab 代码,但没有花哨的函数或矢量化):

尝试使用以下程序确定徽标的唯一稳定性区间 (MinT-MaxT):

TestImage=imread('Leaves.jpg');

TestImage=rgb2gray(TestImage); %Transform RGB to grayscale

NewSER=zeros(size(TestImage)); %initialise stuff
OldSER=zeros(size(TestImage));
SpinSER=zeros(size(TestImage));

Hot=zeros(size(TestImage)); %your stability map

MaxT=255; %your interval, unlike MSER you don't use the whole bit-depth
MinT=1; %try something like 40-150 if you have high contrast in your logo 

for k=MaxT:-1:MinT

    TestImage1=im2bw(TestImage,k/256);

    imshow(abs(Hot/Interval))
    colormap(hot)

    hold on

    text(20,30,['Treshold: ',num2str(k)],'Color','k','FontWeight','bold','FontSize',16,'BackgroundColor','r')

    hold off

    OldSER=NewSER;
    NewSER=TestImage1;

    for i=1:size(TestImage,1);
        for j=1:size(TestImage,2)

            if OldSER(i,j)==NewSER(i,j) && SpinSER(i,j)==0 % Do the extremal regions remain the same/ are they stable over both thresholds?

                Hot(i,j)=Hot(i,j)+1;

            else

                Hot(i,j)=Hot(i,j)-1;

                SpinSER(i,j)=1;

            end

        end

    end

    shg

    pause(0.1)

end

一旦您确定了适合您所在区域的时间间隔,就会生成一张地图以区分图像的其余部分,并在地图上搜索感兴趣的区域。

MaxT=120;

MinT=40;

Map=zeros(x,y);                    %Create a map for the SER-filtering


% TestImageMinT=im2bw(Image,MinT/256);   %Set the range of the extremal region stability.
% TestImageMaxT=im2bw(Image,MaxT/256);
% 
% for i=1:x
%     for j=1:y
%         
%         Map(i,j)=TestImageMaxT(i,j)==TestImageMinT(i,j) ; %Map the pixels that remain stable over the interval
% 
%     end
% end

 Map=abs(Image-(MaxT-MinT)/(2*MaxT))*2*MaxT/(MaxT-MinT); %More or less equivalent to the loop comented above but >10x faster...
 Map=Map>0.5; %... 

并将您想要的任何检测器应用于该区域或 ¬(该区域)

Corners = CornerSusanMapped(ImageBW,Map,17);

希望对您有所帮助并玩得开心!

于 2013-07-22T14:41:32.100 回答