vampire.processing.sample_contour#

vampire.processing.sample_contour(contour, n_sample_pts)[source]#

Returns sample points of contour using B-spline.

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

Parameters:
contourndarray

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

n_sample_ptsint

Number of sample points after resample.

Returns:
sampled_contourndarray

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