(j)
| 35 | |
| 36 | # function to convert the matches to hom. points |
| 37 | def convert_points(j): |
| 38 | ndx = matches[j].nonzero()[0] |
| 39 | fp = homography.make_homog(l[j+1][ndx,:2].T) |
| 40 | ndx2 = [int(matches[j][i]) for i in ndx] |
| 41 | tp = homography.make_homog(l[j][ndx2,:2].T) |
| 42 | |
| 43 | # switch x and y - TODO this should move elsewhere |
| 44 | fp = vstack([fp[1],fp[0],fp[2]]) |
| 45 | tp = vstack([tp[1],tp[0],tp[2]]) |
| 46 | return fp,tp |
| 47 | |
| 48 | |
| 49 | # estimate the homographies |