def intensity_along_curve(image, curve, order = 3):
"""Returns intensity profile along a curve in an image
Arguments:
image (array): the grayscale image
curve (nx2 array): points defining the curve
order (int): interpolation order
Returns:
n array: intensity values along curve
"""
return ndi.map_coordinates(image, curve.T[::-1], order = order);
评论列表
文章目录