jianxiongxiao / SFMedu

SFMedu: A Matlab-based Structure-from-Motion System for Education
202 stars 59 forks source link

Feature points coordinates. Inversion of Y : OK. Inversion of X: need clarification #3

Open alvaro562003 opened 7 years ago

alvaro562003 commented 7 years ago

Hello, Thank you for this excellent SFM example.

Comments are not coherent with the code. I guess the inversion on the X is an error as usually only Y is inverted as stated in the comment

file match2viewSIFT.m % translate to center and invert the vertical SIFTloc_i(1,:) = -(SIFTloc_i(1,:) - size(image_i,2)/2); SIFTloc_i(2,:) = -(SIFTloc_i(2,:) - size(image_i,1)/2);

SIFTloc_j(1,:) = -(SIFTloc_j(1,:) - size(image_j,2)/2); SIFTloc_j(2,:) = -(SIFTloc_j(2,:) - size(image_j,1)/2);

same things on file match2viewSURF.m matchedPtsA = [size(colorA,2)/2-matchedPtsA.Location(:,1) size(colorA,1)/2-matchedPtsA.Location(:,2)]; matchedPtsB = [size(colorB,2)/2-matchedPtsB.Location(:,1) size(colorB,1)/2-matchedPtsB.Location(:,2)];