Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ft = np.transpose(F)
- for i in range(28):
- An = np.zeros((4,4),np.float32)
- J = np.array([np.dot(Ft,np.append(Y1[i],1))[0], np.dot(Ft,np.append(Y1[i],1))[1], np.dot(F,np.append(Y[i],1))[0], np.dot(F,np.append(Y[i],1))[1]])
- print "J = ",J
- xyxy = np.array([Y[i][0],Y[i][1],Y1[i][0],Y1[i][1]])
- top = np.dot(np.dot(np.transpose(np.append(Y1[i],1)),F),np.append(Y[i],1))
- print "top = ",top
- ftx = np.dot(np.transpose(F), np.append(Y1[i],1))
- bottom = np.dot(J[2],J[2])+ np.dot(J[3],J[3])+ np.dot(J[0],J[0])+np.dot(J[1],J[1])
- print "bottom = ", bottom
- poi = xyxy - np.dot((top/bottom),J.T)
- x = np.array([poi[0], poi[1]])
- xn = np.array([poi[2],poi[3]])
- print "xold = ", Y[i]
- print "x2old = ", Y1[i]
- print "x = ",x
- print "xn = ", xn
- points[i,:] = triangulate(An,x,xn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement