示例#1
0
def convert_affine_to_general(tx, ty, theta, phi, lamda1, lamda2):    
    
    H = func_homographyMatrix.make_homography(tx, ty, theta, phi, lamda1, lamda2)
    
    a1=H[0,0]
    a2=H[0,1]
    a3=tx
    a4=H[1,0]
    a5=H[1,1]
    a6=ty
    
    return a1, a2, a3, a4, a5, a6
示例#2
0
theta = param[2]
phi = param[3]
lamda1 = param[4]
lamda2 = param[5]

#same with input parameters
print '\n<result of conversion from general parameterization>'
print 'tx = ', tx
print 'ty = ', ty
print 'theta = ', theta
print 'phi = ', phi
print 'lamda1 = ', lamda1
print 'lamda2 = ', lamda2

#same homography matrix
H_2 = func_homographyMatrix.make_homography(tx, ty, theta, phi, lamda1, lamda2)
print '\nnew affine H = \n', H_2



print '--------------------------------------------------------------'

#case 2. lamda1 < lamda2
print 'case 2. lamda1 < lamda2\n'

lamda1 = 0.5
lamda2 = 1

print '<input parameters>'
print 'tx = ', tx
print 'ty = ', ty
示例#3
0
theta = param[2]
phi = param[3]
lamda1 = param[4]
lamda2 = param[5]

#same with input parameters
print '\n<result of conversion from general parameterization>'
print 'tx = ', tx
print 'ty = ', ty
print 'theta = ', theta
print 'phi = ', phi
print 'lamda1 = ', lamda1
print 'lamda2 = ', lamda2

#same homography matrix
H_2 = func_homographyMatrix.make_homography(tx, ty, theta, phi, lamda1, lamda2)
print '\nnew affine H = \n', H_2

print '--------------------------------------------------------------'

#case 2. lamda1 < lamda2
print 'case 2. lamda1 < lamda2\n'

lamda1 = 0.5
lamda2 = 1

print '<input parameters>'
print 'tx = ', tx
print 'ty = ', ty
print 'theta = ', theta
print 'phi = ', phi
示例#4
0
#1.1 test
                
#Making homography matrix

print 'making homography matrix'

tx = 10
ty = 30
theta = 60
s = 2

phi = 30
lamda1 = 2
lamda2 = 1

H = func_homographyMatrix.make_homography(tx)

H_translation = func_homographyMatrix.make_homography(tx, ty)
print 'tx = ', tx
print 'ty = ', ty
print '\nH_translation = \n', H_translation
print '---------------------------------------------------'

H_euclidean = func_homographyMatrix.make_homography(tx, ty, theta)
print 'tx = ', tx
print 'ty = ', ty
print 'theta = ', theta
print '\nH_euclidean = \n', H_euclidean
print '---------------------------------------------------'

H_similarity = func_homographyMatrix.make_homography(tx, ty, theta, s)
示例#5
0
#1.1 test
                
#Making homography matrix

print 'making homography matrix'

tx = 10
ty = 30
theta = 60
s = 2

phi = 30
lamda1 = 2
lamda2 = 1

H = func_homographyMatrix.make_homography(tx)

H_translation = func_homographyMatrix.make_homography(tx, ty)
print 'tx = ', tx
print 'ty = ', ty
print '\nH_translation = \n', H_translation
print '---------------------------------------------------'

H_euclidean = func_homographyMatrix.make_homography(tx, ty, theta)
print 'tx = ', tx
print 'ty = ', ty
print 'theta = ', theta
print '\nH_euclidean = \n', H_euclidean
print '---------------------------------------------------'

H_similarity = func_homographyMatrix.make_homography(tx, ty, theta, s)