how to automate the number of point matching in OpenSurf?
1 view (last 30 days)
Show older comments
I'm working on implementing the source code SURF Opensurf after detection and description, the matching phase arrives,and that the steps that I have problems.
I have two same-size image I1 and I2 ,then calculates the detector and descriptor with OpenSurf function as follows:
Ipts1=OpenSurf(I1,Options);
Ipts2=OpenSurf(I2,Options);
after its put the landmark descriptors in a matrix
D1 = reshape([Ipts1.descriptor],64,[]);
D2 = reshape([Ipts2.descriptor],64,[]);
%%%%%%Then it try to Find the best matches
err=zeros(1,length(Ipts1));
cor1=1:length(Ipts1);
cor2=zeros(1,length(Ipts1));
for i=1:length(Ipts1),
distance=sum((D2-repmat(D1(:,i),[1 length(Ipts2)])).^2,1);
[err(i),cor2(i)]=min(distance);
end
1.if somebody can explain to me what it seeks to do by:
sum((D2-repmat(D1(:,i),[1 length(Ipts2)])).^2,1);
why they used
repmat ???
after that it Sort matches on vector distance by
[err, ind]=sort(err);
cor1=cor1(ind);
cor2=cor2(ind);
and make vectors with the coordinates of the best matches :
Pos1=[[Ipts1(cor1).y]',[Ipts1(cor1).x]'];
Pos2=[[Ipts2(cor2).y]',[Ipts2(cor2).x]'];
and it fixed manually number of matching :
Pos1=Pos1(1:30,:);
Pos2=Pos2(1:30,:);
the results of the matching influences the final result of registration (transformation), once an incorrect matching a distorted image causes. the number of matching is different, it depends Image used, sometimes 30, sometimes 10 and sometimes 100 etc .... in the exemple, it use 30 best matches points,My second question is :
2.how to keep automatically only the number of correct matching, once there is an incorrect matching, return to the last correct matching and break the loop. how to know this number, is Type d'ecart or variance or something else help to do this?? if someone can Help me in code I will be grateful, I'm stuck here.
0 Comments
Answers (0)
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!