Class RgbdNormals


  • public class RgbdNormals
    extends java.lang.Object
    Object that can compute the normals in an image. It is an object as it can cache data for speed efficiency The implemented methods are either: - FALS (the fastest) and SRI from Fast and Accurate Computation of Surface Normals from Range Images by H. Badino, D. Huber, Y. Park and T. Kanade - the normals with bilateral filtering on a depth image from Gradient Response Maps for Real-Time Detection of Texture-Less Objects by S. Hinterstoisser, C. Cagniart, S. Ilic, P. Sturm, N. Navab, P. Fua, and V. Lepetit
    • Field Detail

      • nativeObj

        protected final long nativeObj
      • RGBD_NORMALS_METHOD_FALS

        public static final int RGBD_NORMALS_METHOD_FALS
        See Also:
        Constant Field Values
      • RGBD_NORMALS_METHOD_LINEMOD

        public static final int RGBD_NORMALS_METHOD_LINEMOD
        See Also:
        Constant Field Values
      • RGBD_NORMALS_METHOD_SRI

        public static final int RGBD_NORMALS_METHOD_SRI
        See Also:
        Constant Field Values
      • RGBD_NORMALS_METHOD_CROSS_PRODUCT

        public static final int RGBD_NORMALS_METHOD_CROSS_PRODUCT
        See Also:
        Constant Field Values
    • Constructor Detail

      • RgbdNormals

        protected RgbdNormals​(long addr)
    • Method Detail

      • getNativeObjAddr

        public long getNativeObjAddr()
      • __fromPtr__

        public static RgbdNormals __fromPtr__​(long addr)
      • create

        public static RgbdNormals create​(int rows,
                                         int cols,
                                         int depth,
                                         Mat K,
                                         int window_size,
                                         float diff_threshold,
                                         int method)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        depth - the depth of the normals (only CV_32F or CV_64F)
        K - the calibration matrix to use
        window_size - the window size to compute the normals: can only be 1,3,5 or 7
        diff_threshold - threshold in depth difference, used in LINEMOD algirithm
        method - one of the methods to use: RGBD_NORMALS_METHOD_SRI, RGBD_NORMALS_METHOD_FALS
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows,
                                         int cols,
                                         int depth,
                                         Mat K,
                                         int window_size,
                                         float diff_threshold)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        depth - the depth of the normals (only CV_32F or CV_64F)
        K - the calibration matrix to use
        window_size - the window size to compute the normals: can only be 1,3,5 or 7
        diff_threshold - threshold in depth difference, used in LINEMOD algirithm
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows,
                                         int cols,
                                         int depth,
                                         Mat K,
                                         int window_size)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        depth - the depth of the normals (only CV_32F or CV_64F)
        K - the calibration matrix to use
        window_size - the window size to compute the normals: can only be 1,3,5 or 7
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows,
                                         int cols,
                                         int depth,
                                         Mat K)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        depth - the depth of the normals (only CV_32F or CV_64F)
        K - the calibration matrix to use
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows,
                                         int cols,
                                         int depth)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        depth - the depth of the normals (only CV_32F or CV_64F)
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows,
                                         int cols)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        cols - the number of cols of the depth image normals will be computed on
        Returns:
        automatically generated
      • create

        public static RgbdNormals create​(int rows)
        Creates new RgbdNormals object
        Parameters:
        rows - the number of rows of the depth image normals will be computed on
        Returns:
        automatically generated
      • create

        public static RgbdNormals create()
        Creates new RgbdNormals object
        Returns:
        automatically generated
      • apply

        public void apply​(Mat points,
                          Mat normals)
        Given a set of 3d points in a depth image, compute the normals at each point.
        Parameters:
        points - a rows x cols x 3 matrix of CV_32F/CV64F or a rows x cols x 1 CV_U16S
        normals - a rows x cols x 3 matrix
      • cache

        public void cache()
        Prepares cached data required for calculation If not called by user, called automatically at first calculation
      • getRows

        public int getRows()
      • setRows

        public void setRows​(int val)
      • getCols

        public int getCols()
      • setCols

        public void setCols​(int val)
      • getWindowSize

        public int getWindowSize()
      • setWindowSize

        public void setWindowSize​(int val)
      • getDepth

        public int getDepth()
      • getK

        public void getK​(Mat val)
      • setK

        public void setK​(Mat val)
      • getMethod

        public int getMethod()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable