简体   繁体   中英

B-spline interpolation of deformation field for images

I am currently registering some images with Python, but creating my own tool to do so, as the current registration techniques do not suit my goal. I want to estimate b-splines of a deformation field but I am having issues extending anything I read about it to 2d images.

I already have a list of points that are matched between two images, and the deformation field at the locations...I want to use b-splines to generalize the deformation field to every point in the image.

# Find control points in the image
# p is a vector 2xnumber of control points
p = find_control_points(live_im)

# Find deformation of control points
# d is 1xnumber of control points
d = det_best_match(mask_im, live_im, p)

I have an image that is NxN and control points p that are the locations in the image. I was thinking about using scipy.interpolate.BSpline but you already need t, c, k to provide to it. All the examples are in 1d, and I guess I have a 3d example. I cannot for the life of me figure anything out regarding the maths. Has anyone used this before or could see if this is even achieve-able with this function?

For B-spline curves/surfaces, control points are not the points on the curve/surface. You sure you already know them just by comparing the distorted image with the original?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM