Closed vivanov879 closed 11 years ago
tested with the following code :
imname1 = 'images/climbing_1_small.jpg' imname2 = 'images/climbing_2_small.jpg' im1 = array(Image.open(imname1).convert('L')) im2 = array(Image.open(imname2).convert('L')) process_image(imname1,imname1 + '.sift') process_image(imname2,imname2 + '.sift') l1,d1 = read_features_from_file(imname1 + '.sift') l2,d2 = read_features_from_file(imname2 + '.sift') matchscores = match_twosided(d1,d2) im1 = array(Image.open(imname1)) im2 = array(Image.open(imname2)) plot_matches(im1,im2,l1,l2,matchscores,show_below=True)
show()
@vladivanov Thanks. I changed and added the match example code in 'examples'. (https://github.com/jesolem/PCV/commit/82372583d6a2f77503e6ddaa803fae7cab8a8e22)
Sorry to revive this. The repository has duplicates of code. For example: master/PCV/localdescriptors/sift.py _master/pcvbook/sift.py The above correction was applied to the former file, but not the latter.
Is one set being phased out in favor of another? In any case, can you please apply the same correction to the latter pcv_book/sift.py?
function plot_matches in sift.py should contain: plot([locs1[i][0],locs2[m][0]+cols1],[locs1[i][1],locs2[m][1]])
because in locs coordinate x comes before y