Package boofcv.abst.distort
Interface PointDeformKeyPoints
- All Superinterfaces:
Point2Transform2_F32
- All Known Implementing Classes:
PointDeform_MLS
Defines a mapping which deforms the image based on the location of key points inside the image.
Image pixels will gravitate towards closer key points and their distorted location based on some distance metric.
Concurrency: Do not use this class to render at the same time you're invoking any of its functions! The transformation will be in an unsafe state.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetDestination(int which, float x, float y) Changes the destination location of a single key pointvoidsetDestination(List<Point2D_F32> locations) Specifies the distorted location of all the key points.voidsetImageShape(int width, int height) Must be called first.voidsetSource(int which, float x, float y) Changes the source location of a single key pointvoidsetSource(List<Point2D_F32> locations) Specifies the location of all the key points.Methods inherited from interface boofcv.struct.distort.Point2Transform2_F32
compute, copyConcurrent
-
Method Details
-
setImageShape
void setImageShape(int width, int height) Must be called first. Specifies the shape of the image this transform will be applied to- Parameters:
width- image widthheight- image height
-
setSource
Specifies the location of all the key points. The initial distorted location of each keypoint will be set to the same location.- Parameters:
locations- Location of key points in undistorted image. Local copy of points is saved.
-
setDestination
Specifies the distorted location of all the key points.- Parameters:
locations- location of key points in distorted image. Local copy of points is saved.
-
setSource
void setSource(int which, float x, float y) Changes the source location of a single key point- Parameters:
which- Index of key point to changex- distorted x-coordinatey- distorted y-coordinate
-
setDestination
void setDestination(int which, float x, float y) Changes the destination location of a single key point- Parameters:
which- Index of key point to changex- distorted x-coordinatey- distorted y-coordinate
-