vampire.processing.sample_contour

vampire.processing.sample_contour(contour, num_sample_points)[source]

Returns sample points of contour using B-spline.

Interpolate given coordinates of an object contour using B-spline, then fit num_sample_points equidistant points to the B-spline.

Parameters
contourndarray

x and y coordinates of object contour, with shape (2, n).

num_sample_pointsint

Number of sample points after resample.

Returns
sampled_contourndarray

num_sample_points equidistant contour sample points, with shape (2, num_sample_points).