Closed tdowrick closed 3 years ago
Refactor from elsewhere:
number_of_points = number_of_dots[0] number_of_dots[1] model_points = np.zeros((number_of_points, 6)) counter = 0 for y_index in range(number_of_dots[0]): for x_index in range(number_of_dots[1]): model_points[counter][0] = counter model_points[counter][1] = (x_index + 1) pixels_per_mm model_points[counter][2] = (y_index + 1) pixels_per_mm model_points[counter][3] = x_index dot_separation model_points[counter][4] = y_index * dot_separation model_points[counter][5] = 0 counter = counter + 1
Refactor from elsewhere:
number_of_points = number_of_dots[0] number_of_dots[1] model_points = np.zeros((number_of_points, 6)) counter = 0 for y_index in range(number_of_dots[0]): for x_index in range(number_of_dots[1]): model_points[counter][0] = counter model_points[counter][1] = (x_index + 1) pixels_per_mm model_points[counter][2] = (y_index + 1) pixels_per_mm model_points[counter][3] = x_index dot_separation model_points[counter][4] = y_index * dot_separation model_points[counter][5] = 0 counter = counter + 1