Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.83 KB | None | 0 0
  1. Ft = np.transpose(F)
  2.  
  3.  
  4. for i in range(28):
  5.     An = np.zeros((4,4),np.float32)
  6.     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]])
  7.     print "J = ",J
  8.     xyxy = np.array([Y[i][0],Y[i][1],Y1[i][0],Y1[i][1]])
  9.     top = np.dot(np.dot(np.transpose(np.append(Y1[i],1)),F),np.append(Y[i],1))
  10.     print "top = ",top
  11.     ftx = np.dot(np.transpose(F), np.append(Y1[i],1))
  12.     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])
  13.     print "bottom = ", bottom
  14.     poi =  xyxy - np.dot((top/bottom),J.T)
  15.     x = np.array([poi[0], poi[1]])
  16.     xn = np.array([poi[2],poi[3]])
  17.     print "xold = ", Y[i]
  18.     print "x2old = ", Y1[i]
  19.     print "x = ",x
  20.     print "xn = ", xn
  21.     points[i,:] = triangulate(An,x,xn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement