Package boofcv.alg.sfm.d3.direct
Class VisOdomDirectColorDepth<I extends ImageGray<I>,D extends ImageGray<D>>
java.lang.Object
boofcv.alg.sfm.d3.direct.VisOdomDirectColorDepth<I,D>
TODO Fill in
-
Constructor Summary
ConstructorDescriptionVisOdomDirectColorDepth
(int numBands, Class<I> imageType, Class<D> derivType) Declares internal data structures and specifies the type of input images to expect -
Method Summary
Modifier and TypeMethodDescriptiondouble
computeFeatureDiversity
(Se3_F32 keyToCurrent) Computes the diversity of valid pixels in keyframe to the location in the current frame.boolean
estimateMotion
(Planar<I> input, Se3_F32 hintKeyToInput) Estimates the motion relative to the key frame.float
int
int
void
setCameraParameters
(float fx, float fy, float cx, float cy, int width, int height) Specifies intrinsic camera parameters.void
setConvergence
(float convergenceTol, int maxIterations) Specifies convergence parametersvoid
setInterpolation
(double inputMin, double inputMax, double derivMin, double derivMax, InterpolationType type) Used to change interpolation method.
-
Constructor Details
-
VisOdomDirectColorDepth
Declares internal data structures and specifies the type of input images to expect- Parameters:
imageType
- Input image typederivType
- Type of image to store the derivative in
-
-
Method Details
-
setCameraParameters
public void setCameraParameters(float fx, float fy, float cx, float cy, int width, int height) Specifies intrinsic camera parameters. Must be called.- Parameters:
fx
- focal length x (pixels)fy
- focal length y (pixels)cx
- principle point x (pixels)cy
- principle point y (pixels)width
- Width of the imageheight
- Height of the image
-
setInterpolation
public void setInterpolation(double inputMin, double inputMax, double derivMin, double derivMax, InterpolationType type) Used to change interpolation method. Probably don't want to do this.- Parameters:
inputMin
- min value for input pixels. 0 is typicalinputMax
- max value for input pixels. 255 is typicalderivMin
- min value for the derivative of input pixelsderivMax
- max value for the derivative of input pixelstype
- Type of interpolation method to use
-
setConvergence
public void setConvergence(float convergenceTol, int maxIterations) Specifies convergence parameters- Parameters:
convergenceTol
- When change in error is less than this fraction stop. Try 1e-6maxIterations
- When this number of iterations has been exceeded stop. Try 10
-
computeFeatureDiversity
Computes the diversity of valid pixels in keyframe to the location in the current frame.- Returns:
- Angular spread along the smallest axis in radians
-
estimateMotion
Estimates the motion relative to the key frame.- Parameters:
input
- Next image in the sequencehintKeyToInput
- estimated transform from keyframe to the current input image- Returns:
- true if it was successful at estimating the motion or false if it failed for some reason
-
getErrorOptical
public float getErrorOptical() -
getInboundsPixels
public int getInboundsPixels() -
getKeyframePixels
public int getKeyframePixels() -
getKeyToCurrent
-
getImageType
-
getDerivType
-