1., 1., ]]) ## CREATE A SET OF IMAGE POINTS FOR VALIDATION OF THE HOMOGRAPHY ESTIMATION # This will create a grid of 16 points of size = (0.3,0.3) meters validation_plane = Plane(origin=np.array([0, 0, 0]), normal=np.array([0, 0, 1]), size=(0.3, 0.3), n=(4, 4)) validation_plane.uniform() ## we create the gradient for the point distribution normalize = False n = 0.00000004 #condition number norm 4 points gradient = gd.create_gradient(metric='condition_number', n=n) #define the plots #one Figure for image and object points fig11 = plt.figure('Image Plane Coordinates') ax_image = fig11.add_subplot(111) fig12 = plt.figure('Control Points plane Coordinates') ax_object = fig12.add_subplot(111) if calc_metrics: #another figure for Homography error and condition numbers fig2 = plt.figure('Effect of point configuration in homography estimation') ax_cond = plt.subplot(211) ax_homo_error = plt.subplot(212, sharex=ax_cond) #another figure for Pose errors
#%% ## CREATE A SET OF IMAGE POINTS FOR VALIDATION OF THE HOMOGRAPHY ESTIMATION validation_plane = Plane(origin=np.array([0, 0, 0]), normal = np.array([0, 0, 1]), size=(0.3,0.3), n = (4,4)) validation_plane.uniform() ## we create the gradient for the point distribution normalize= False n = 0.00001 #condition number norm gradient = gd.create_gradient(metric='repro_error', n = n) #normalize= True #n = 0.0001 #condition number norm #gradient = gd.create_gradient(metric='condition_number', n = n) #gradient = gd.create_gradient(metric='pnorm_condition_number') #gradient = gd.create_gradient(metric='volker_metric') objectPoints_des = pl.get_points() # we now replace the first 4 points with the border positions #pl.uniform()