Skip to content

print() function for Python 3 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions matlab_cp2tform.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,42 +584,42 @@ def get_similarity_transform_for_cv2(src_pts, dst_pts, reflective=True):
uv = np.array((u, v)).T
xy = np.array((x, y)).T

print '\n--->uv:'
print uv
print '\n--->xy:'
print xy
print('\n--->uv:')
print(uv)
print('\n--->xy:')
print(xy)

trans, trans_inv = get_similarity_transform(uv, xy)

print '\n--->trans matrix:'
print trans
print('\n--->trans matrix:')
print(trans)

print '\n--->trans_inv matrix:'
print trans_inv
print('\n--->trans_inv matrix:')
print(trans_inv)

print '\n---> apply transform to uv'
print '\nxy_m = uv_augmented * trans'
print('\n---> apply transform to uv')
print('\nxy_m = uv_augmented * trans')
uv_aug = np.hstack((
uv, np.ones((uv.shape[0], 1))
))
xy_m = np.dot(uv_aug, trans)
print xy_m
print(xy_m)

print '\nxy_m = tformfwd(trans, uv)'
print('\nxy_m = tformfwd(trans, uv)')
xy_m = tformfwd(trans, uv)
print xy_m
print(xy_m)

print '\n---> apply inverse transform to xy'
print '\nuv_m = xy_augmented * trans_inv'
print('\n---> apply inverse transform to xy')
print('\nuv_m = xy_augmented * trans_inv')
xy_aug = np.hstack((
xy, np.ones((xy.shape[0], 1))
))
uv_m = np.dot(xy_aug, trans_inv)
print uv_m
print(uv_m)

print '\nuv_m = tformfwd(trans_inv, xy)'
print('\nuv_m = tformfwd(trans_inv, xy)')
uv_m = tformfwd(trans_inv, xy)
print uv_m
print(uv_m)

uv_m = tforminv(trans, xy)
print '\nuv_m = tforminv(trans, xy)'
Expand Down