Class OdometryFrame

java.lang.Object
org.opencv.ptcloud.OdometryFrame

public class OdometryFrame extends Object
An object that keeps per-frame data for Odometry algorithms from user-provided images to algorithm-specific precalculated data. When not empty, it contains a depth image, a mask of valid pixels and a set of pyramids generated from that data. A BGR/Gray image and normals are optional. OdometryFrame is made to be used together with Odometry class to reuse precalculated data between Rt data calculations. A correct way to do that is to call Odometry::prepareFrames() on prev and next frames and then pass them to Odometry::compute() method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Construct a new OdometryFrame object.
    protected
    OdometryFrame(long addr)
     
     
    Construct a new OdometryFrame object.
     
    OdometryFrame(Mat depth, Mat image)
    Construct a new OdometryFrame object.
     
    OdometryFrame(Mat depth, Mat image, Mat mask)
    Construct a new OdometryFrame object.
     
    OdometryFrame(Mat depth, Mat image, Mat mask, Mat normals)
    Construct a new OdometryFrame object.
  • Method Summary

    Modifier and Type
    Method
    Description
    __fromPtr__(long addr)
     
    void
    getDepth(Mat depth)
    Get the original user-provided depth image
    void
    Get the gray image generated from the user-provided BGR/Gray image
    void
    getImage(Mat image)
    Get the original user-provided BGR/Gray image
    void
    getMask(Mat mask)
    Get the valid pixels mask generated for the ICP calculations intersected with the user-provided mask
    long
     
    void
    getNormals(Mat normals)
    Get the normals image either generated for the ICP calculations or user-provided
    void
    Get the depth image generated from the user-provided one after conversion, rescale or filtering for ICP algorithm needs
    void
    getPyramidAt(Mat img, int pyrType, long level)
    Get the image generated for the ICP calculations from one of the pyramids specified by pyrType.
    int
    Get the amount of levels in pyramids (all of them if not empty should have the same number of levels) or 0 if no pyramids were prepared yet

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • nativeObj

      protected final long nativeObj
  • Constructor Details

    • OdometryFrame

      protected OdometryFrame(long addr)
    • OdometryFrame

      public OdometryFrame(Mat depth, Mat image, Mat mask, Mat normals)
      Construct a new OdometryFrame object. All non-empty images should have the same size.
      Parameters:
      depth - A depth image, should be CV_8UC1
      image - An BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
      mask - A user-provided mask of valid pixels, should be CV_8UC1
      normals - A user-provided normals to the depth surface, should be CV_32FC4
    • OdometryFrame

      public OdometryFrame(Mat depth, Mat image, Mat mask)
      Construct a new OdometryFrame object. All non-empty images should have the same size.
      Parameters:
      depth - A depth image, should be CV_8UC1
      image - An BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
      mask - A user-provided mask of valid pixels, should be CV_8UC1
    • OdometryFrame

      public OdometryFrame(Mat depth, Mat image)
      Construct a new OdometryFrame object. All non-empty images should have the same size.
      Parameters:
      depth - A depth image, should be CV_8UC1
      image - An BGR or grayscale image (or noArray() if it's not required for used ICP algorithm). Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
    • OdometryFrame

      public OdometryFrame(Mat depth)
      Construct a new OdometryFrame object. All non-empty images should have the same size.
      Parameters:
      depth - A depth image, should be CV_8UC1 Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
    • OdometryFrame

      public OdometryFrame()
      Construct a new OdometryFrame object. All non-empty images should have the same size. Should be CV_8UC3 or CV_8C4 if it's BGR image or CV_8UC1 if it's grayscale. If it's BGR then it's converted to grayscale image automatically.
  • Method Details

    • getNativeObjAddr

      public long getNativeObjAddr()
    • __fromPtr__

      public static OdometryFrame __fromPtr__(long addr)
    • getImage

      public void getImage(Mat image)
      Get the original user-provided BGR/Gray image
      Parameters:
      image - Output image
    • getGrayImage

      public void getGrayImage(Mat image)
      Get the gray image generated from the user-provided BGR/Gray image
      Parameters:
      image - Output image
    • getDepth

      public void getDepth(Mat depth)
      Get the original user-provided depth image
      Parameters:
      depth - Output image
    • getProcessedDepth

      public void getProcessedDepth(Mat depth)
      Get the depth image generated from the user-provided one after conversion, rescale or filtering for ICP algorithm needs
      Parameters:
      depth - Output image
    • getMask

      public void getMask(Mat mask)
      Get the valid pixels mask generated for the ICP calculations intersected with the user-provided mask
      Parameters:
      mask - Output image
    • getNormals

      public void getNormals(Mat normals)
      Get the normals image either generated for the ICP calculations or user-provided
      Parameters:
      normals - Output image
    • getPyramidLevels

      public int getPyramidLevels()
      Get the amount of levels in pyramids (all of them if not empty should have the same number of levels) or 0 if no pyramids were prepared yet
      Returns:
      automatically generated
    • getPyramidAt

      public void getPyramidAt(Mat img, int pyrType, long level)
      Get the image generated for the ICP calculations from one of the pyramids specified by pyrType. Returns empty image if the pyramid is empty or there's no such pyramid level
      Parameters:
      img - Output image
      pyrType - Type of pyramid
      level - Level in the pyramid