SciKit-Surgery / scikit-surgeryimage

Image processing, using OpenCV.
Other
2 stars 2 forks source link

Function for creating model point array #85

Closed tdowrick closed 3 years ago

tdowrick commented 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