public class StitchingFromMotion2D<I extends boofcv.struct.image.ImageBase,IT extends georegression.struct.InvertibleTransform>
extends java.lang.Object
ImageMotion2D, typically used for image stabilization
and creating mosaics. Internally any motion model in the Homogeneous family can be used. For convenience,
those models are converted into a Homography2D_F64 on output.
The size of the stitch region is specified using configure(int, int, georegression.struct.InvertibleTransform)
which must be called before any images are processed. One of the parameters include an initial transform. The
initial transform can be used to scale/translate/other the input image.
A sudden change or jump in the shape of the view area can be an indication of a bad motion estimate. If a large
jump larger than the user specified threshold is detected then process(boofcv.struct.image.ImageBase)
will return false.| Modifier and Type | Class and Description |
|---|---|
static class |
StitchingFromMotion2D.Corners |
| Constructor and Description |
|---|
StitchingFromMotion2D(ImageMotion2D<I,IT> motion,
boofcv.alg.distort.ImageDistort<I,I> distorter,
StitchingTransform<IT> converter,
double maxJumpFraction)
Provides internal algorithms and tuning parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(int widthStitch,
int heightStitch,
IT worldToInit)
Specifies size of stitch image and the location of the initial coordinate system.
|
StitchingFromMotion2D.Corners |
getImageCorners(int width,
int height,
StitchingFromMotion2D.Corners corners)
Returns the location of the input image's corners inside the stitch image.
|
ImageMotion2D<I,IT> |
getMotion() |
I |
getStitchedImage() |
IT |
getWorldToCurr() |
georegression.struct.homography.Homography2D_F64 |
getWorldToCurr(georegression.struct.homography.Homography2D_F64 storage)
Transform from world coordinate system into the current image frame.
|
boolean |
process(I image)
Estimates the image motion and updates stitched image.
|
void |
reset()
Throws away current results and starts over again
|
void |
resizeStitchImage(int widthStitch,
int heightStitch,
IT newToOldStitch)
Resizes the stitch image.
|
void |
setOriginToCurrent()
Sets the current image to be the origin of the stitched coordinate system.
|
public StitchingFromMotion2D(ImageMotion2D<I,IT> motion, boofcv.alg.distort.ImageDistort<I,I> distorter, StitchingTransform<IT> converter, double maxJumpFraction)
motion - Estimates image motiondistorter - Applies found transformation to stitch imagesconverter - Converts internal model into a homogenous transformationmaxJumpFraction - If the view area changes by more than this fraction a fault is declaredpublic void configure(int widthStitch,
int heightStitch,
IT worldToInit)
widthStitch - Width of the image being stitched intoheightStitch - Height of the image being stitched intoworldToInit - (Option) Used to change the location of the initial frame in stitched image.
null means no transform.public boolean process(I image)
reset() and start over.image - Next image in the sequencepublic void reset()
public void setOriginToCurrent()
process(boofcv.struct.image.ImageBase).public void resizeStitchImage(int widthStitch,
int heightStitch,
IT newToOldStitch)
widthStitch - The new width of the stitch image.heightStitch - The new height of the stitch image.newToOldStitch - (Optional) Transform from new stitch image pixels to old stick pixels. Can be null.public StitchingFromMotion2D.Corners getImageCorners(int width, int height, StitchingFromMotion2D.Corners corners)
public georegression.struct.homography.Homography2D_F64 getWorldToCurr(georegression.struct.homography.Homography2D_F64 storage)
public IT getWorldToCurr()
public I getStitchedImage()
public ImageMotion2D<I,IT> getMotion()