Package org.opencv.cv3d
Class RgbdNormals
- java.lang.Object
-
- org.opencv.cv3d.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 Summary
Fields Modifier and Type Field Description protected long
nativeObj
static int
RGBD_NORMALS_METHOD_CROSS_PRODUCT
static int
RGBD_NORMALS_METHOD_FALS
static int
RGBD_NORMALS_METHOD_LINEMOD
static int
RGBD_NORMALS_METHOD_SRI
-
Constructor Summary
Constructors Modifier Constructor Description protected
RgbdNormals(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RgbdNormals
__fromPtr__(long addr)
void
apply(Mat points, Mat normals)
Given a set of 3d points in a depth image, compute the normals at each point.void
cache()
Prepares cached data required for calculation If not called by user, called automatically at first calculationstatic RgbdNormals
create()
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols, int depth)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols, int depth, Mat K)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols, int depth, Mat K, int window_size)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols, int depth, Mat K, int window_size, float diff_threshold)
Creates new RgbdNormals objectstatic RgbdNormals
create(int rows, int cols, int depth, Mat K, int window_size, float diff_threshold, int method)
Creates new RgbdNormals objectprotected void
finalize()
int
getCols()
int
getDepth()
void
getK(Mat val)
int
getMethod()
long
getNativeObjAddr()
int
getRows()
int
getWindowSize()
void
setCols(int val)
void
setK(Mat val)
void
setRows(int val)
void
setWindowSize(int val)
-
-
-
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
-
-
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 oncols
- the number of cols of the depth image normals will be computed ondepth
- the depth of the normals (only CV_32F or CV_64F)K
- the calibration matrix to usewindow_size
- the window size to compute the normals: can only be 1,3,5 or 7diff_threshold
- threshold in depth difference, used in LINEMOD algirithmmethod
- 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 oncols
- the number of cols of the depth image normals will be computed ondepth
- the depth of the normals (only CV_32F or CV_64F)K
- the calibration matrix to usewindow_size
- the window size to compute the normals: can only be 1,3,5 or 7diff_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 oncols
- the number of cols of the depth image normals will be computed ondepth
- the depth of the normals (only CV_32F or CV_64F)K
- the calibration matrix to usewindow_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 oncols
- the number of cols of the depth image normals will be computed ondepth
- 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 oncols
- the number of cols of the depth image normals will be computed ondepth
- 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 oncols
- 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_U16Snormals
- 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 classjava.lang.Object
- Throws:
java.lang.Throwable
-
-