🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

クラス Ptcloud


  • public class Ptcloud
    extends java.lang.Object
    • コンストラクタの要約

      コンストラクタ
      Constructor Description
      Ptcloud()  
    • メソッドの要約

      すべてのメソッド 静的メソッド 具象メソッド
      Modifier and Type Method Description
      static void depthTo3d​(Mat depth, Mat K, Mat points3d)
      Converts a depth image to 3d points.
      static void depthTo3d​(Mat depth, Mat K, Mat points3d, Mat mask)
      Converts a depth image to 3d points.
      static void depthTo3dSparse​(Mat depth, Mat in_K, Mat in_points, Mat points3d)  
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size, double threshold)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size, double threshold, double sensor_error_a)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size, double threshold, double sensor_error_a, double sensor_error_b)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size, double threshold, double sensor_error_a, double sensor_error_b, double sensor_error_c)
      Find the planes in a depth image
      static void findPlanes​(Mat points3d, Mat normals, Mat mask, Mat plane_coefficients, int block_size, int min_size, double threshold, double sensor_error_a, double sensor_error_b, double sensor_error_c, int method)
      Find the planes in a depth image
      static void loadMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices)
      Loads a mesh from a file.
      static void loadMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals)
      Loads a mesh from a file.
      static void loadMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals, Mat colors)
      Loads a mesh from a file.
      static void loadMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals, Mat colors, Mat texCoords)
      Loads a mesh from a file.
      static void loadPointCloud​(java.lang.String filename, Mat vertices)
      Loads a point cloud from a file.
      static void loadPointCloud​(java.lang.String filename, Mat vertices, Mat normals)
      Loads a point cloud from a file.
      static void loadPointCloud​(java.lang.String filename, Mat vertices, Mat normals, Mat rgb)
      Loads a point cloud from a file.
      static void registerDepth​(Mat unregisteredCameraMatrix, Mat registeredCameraMatrix, Mat registeredDistCoeffs, Mat Rt, Mat unregisteredDepth, Size outputImagePlaneSize, Mat registeredDepth)
      Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera.
      static void registerDepth​(Mat unregisteredCameraMatrix, Mat registeredCameraMatrix, Mat registeredDistCoeffs, Mat Rt, Mat unregisteredDepth, Size outputImagePlaneSize, Mat registeredDepth, boolean depthDilation)
      Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera.
      static void rescaleDepth​(Mat in, int type, Mat out)
      If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits<float>::quiet_NaN() Otherwise, the image is simply converted to floats
      static void rescaleDepth​(Mat in, int type, Mat out, double depth_factor)
      If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits<float>::quiet_NaN() Otherwise, the image is simply converted to floats
      static void saveMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices)
      Saves a mesh to a specified file.
      static void saveMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals)
      Saves a mesh to a specified file.
      static void saveMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals, Mat colors)
      Saves a mesh to a specified file.
      static void saveMesh​(java.lang.String filename, Mat vertices, java.util.List<Mat> indices, Mat normals, Mat colors, Mat texCoords)
      Saves a mesh to a specified file.
      static void savePointCloud​(java.lang.String filename, Mat vertices)
      Saves a point cloud to a specified file.
      static void savePointCloud​(java.lang.String filename, Mat vertices, Mat normals)
      Saves a point cloud to a specified file.
      static void savePointCloud​(java.lang.String filename, Mat vertices, Mat normals, Mat rgb)
      Saves a point cloud to a specified file.
      static void triangleRasterize​(Mat vertices, Mat indices, Mat colors, Mat colorBuf, Mat depthBuf, Mat world2cam, double fovY, double zNear, double zFar)
      Renders a set of triangles on a depth and color image Triangles can be drawn white (1.0, 1.0, 1.0), flat-shaded or with a color interpolation between vertices.
      static void triangleRasterize​(Mat vertices, Mat indices, Mat colors, Mat colorBuf, Mat depthBuf, Mat world2cam, double fovY, double zNear, double zFar, TriangleRasterizeSettings settings)
      Renders a set of triangles on a depth and color image Triangles can be drawn white (1.0, 1.0, 1.0), flat-shaded or with a color interpolation between vertices.
      static void triangleRasterizeColor​(Mat vertices, Mat indices, Mat colors, Mat colorBuf, Mat world2cam, double fovY, double zNear, double zFar)
      Overloaded version of triangleRasterize() with color-only rendering
      static void triangleRasterizeColor​(Mat vertices, Mat indices, Mat colors, Mat colorBuf, Mat world2cam, double fovY, double zNear, double zFar, TriangleRasterizeSettings settings)
      Overloaded version of triangleRasterize() with color-only rendering
      static void triangleRasterizeDepth​(Mat vertices, Mat indices, Mat depthBuf, Mat world2cam, double fovY, double zNear, double zFar)
      Overloaded version of triangleRasterize() with depth-only rendering
      static void triangleRasterizeDepth​(Mat vertices, Mat indices, Mat depthBuf, Mat world2cam, double fovY, double zNear, double zFar, TriangleRasterizeSettings settings)
      Overloaded version of triangleRasterize() with depth-only rendering
      static void warpFrame​(Mat depth, Mat image, Mat mask, Mat Rt, Mat cameraMatrix)
      Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane.
      static void warpFrame​(Mat depth, Mat image, Mat mask, Mat Rt, Mat cameraMatrix, Mat warpedDepth)
      Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane.
      static void warpFrame​(Mat depth, Mat image, Mat mask, Mat Rt, Mat cameraMatrix, Mat warpedDepth, Mat warpedImage)
      Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane.
      static void warpFrame​(Mat depth, Mat image, Mat mask, Mat Rt, Mat cameraMatrix, Mat warpedDepth, Mat warpedImage, Mat warpedMask)
      Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane.
      • クラス java.lang.Object から継承したメソッド

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • コンストラクタの詳細

      • Ptcloud

        public Ptcloud()
    • メソッドの詳細

      • loadPointCloud

        public static void loadPointCloud​(java.lang.String filename,
                                          Mat vertices,
                                          Mat normals,
                                          Mat rgb)
        Loads a point cloud from a file. The function loads point cloud from the specified file and returns it. If the cloud cannot be read, throws an error. Vertex coordinates, normals and colors are returned as they are saved in the file even if these arrays have different sizes and their elements do not correspond to each other (which is typical for OBJ files for example) Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        rgb - 頂点ごとの色。各値は3つのfloatを含む
      • loadPointCloud

        public static void loadPointCloud​(java.lang.String filename,
                                          Mat vertices,
                                          Mat normals)
        Loads a point cloud from a file. The function loads point cloud from the specified file and returns it. If the cloud cannot be read, throws an error. Vertex coordinates, normals and colors are returned as they are saved in the file even if these arrays have different sizes and their elements do not correspond to each other (which is typical for OBJ files for example) Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        normals - 頂点ごとの法線。各値は3つのfloatを含む
      • loadPointCloud

        public static void loadPointCloud​(java.lang.String filename,
                                          Mat vertices)
        Loads a point cloud from a file. The function loads point cloud from the specified file and returns it. If the cloud cannot be read, throws an error. Vertex coordinates, normals and colors are returned as they are saved in the file even if these arrays have different sizes and their elements do not correspond to each other (which is typical for OBJ files for example) Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
      • savePointCloud

        public static void savePointCloud​(java.lang.String filename,
                                          Mat vertices,
                                          Mat normals,
                                          Mat rgb)
        Saves a point cloud to a specified file. The function saves point cloud to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        rgb - 頂点ごとの色。各値は3つのfloatを含む
      • savePointCloud

        public static void savePointCloud​(java.lang.String filename,
                                          Mat vertices,
                                          Mat normals)
        Saves a point cloud to a specified file. The function saves point cloud to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        normals - 頂点ごとの法線。各値は3つのfloatを含む
      • savePointCloud

        public static void savePointCloud​(java.lang.String filename,
                                          Mat vertices)
        Saves a point cloud to a specified file. The function saves point cloud to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
      • loadMesh

        public static void loadMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals,
                                    Mat colors,
                                    Mat texCoords)
        Loads a mesh from a file. The function loads mesh from the specified file and returns it. If the mesh cannot be read, throws an error Vertex attributes (i.e. space and texture coodinates, normals and colors) are returned in same-sized arrays with corresponding elements having the same indices. This means that if a face uses a vertex with a normal or a texture coordinate with different indices (which is typical for OBJ files for example), this vertex will be duplicated for each face it uses. Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) (ONLY TRIANGULATED FACES) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        colors - 頂点ごとの色。各値は3つのfloatを含む
        texCoords - 頂点ごとのテクスチャ座標。各値は2つまたは3つのfloatを含む
      • loadMesh

        public static void loadMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals,
                                    Mat colors)
        Loads a mesh from a file. The function loads mesh from the specified file and returns it. If the mesh cannot be read, throws an error Vertex attributes (i.e. space and texture coodinates, normals and colors) are returned in same-sized arrays with corresponding elements having the same indices. This means that if a face uses a vertex with a normal or a texture coordinate with different indices (which is typical for OBJ files for example), this vertex will be duplicated for each face it uses. Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) (ONLY TRIANGULATED FACES) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        colors - 頂点ごとの色。各値は3つのfloatを含む
      • loadMesh

        public static void loadMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals)
        Loads a mesh from a file. The function loads mesh from the specified file and returns it. If the mesh cannot be read, throws an error Vertex attributes (i.e. space and texture coodinates, normals and colors) are returned in same-sized arrays with corresponding elements having the same indices. This means that if a face uses a vertex with a normal or a texture coordinate with different indices (which is typical for OBJ files for example), this vertex will be duplicated for each face it uses. Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) (ONLY TRIANGULATED FACES) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
      • loadMesh

        public static void loadMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices)
        Loads a mesh from a file. The function loads mesh from the specified file and returns it. If the mesh cannot be read, throws an error Vertex attributes (i.e. space and texture coodinates, normals and colors) are returned in same-sized arrays with corresponding elements having the same indices. This means that if a face uses a vertex with a normal or a texture coordinate with different indices (which is typical for OBJ files for example), this vertex will be duplicated for each face it uses. Currently, the following file formats are supported: - [Wavefront obj file *.obj](https://en.wikipedia.org/wiki/Wavefront_.obj_file) (ONLY TRIANGULATED FACES) - [Polygon File Format *.ply](https://en.wikipedia.org/wiki/PLY_(file_format))
        引数:
        filename - ファイル名
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
      • saveMesh

        public static void saveMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals,
                                    Mat colors,
                                    Mat texCoords)
        Saves a mesh to a specified file. The function saves mesh to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイルの名前。
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        colors - 頂点ごとの色。各値は3つのfloatを含む
        texCoords - 頂点ごとのテクスチャ座標。各値は2つまたは3つのfloatを含む
      • saveMesh

        public static void saveMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals,
                                    Mat colors)
        Saves a mesh to a specified file. The function saves mesh to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイルの名前。
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
        colors - 頂点ごとの色。各値は3つのfloatを含む
      • saveMesh

        public static void saveMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices,
                                    Mat normals)
        Saves a mesh to a specified file. The function saves mesh to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイルの名前。
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
        normals - 頂点ごとの法線。各値は3つのfloatを含む
      • saveMesh

        public static void saveMesh​(java.lang.String filename,
                                    Mat vertices,
                                    java.util.List<Mat> indices)
        Saves a mesh to a specified file. The function saves mesh to the specified file. File format is chosen based on the filename extension.
        引数:
        filename - ファイルの名前。
        vertices - 頂点座標。各値は3つのfloatを含む
        indices - 面ごとの頂点リスト。各値はintのベクトル
      • triangleRasterize

        public static void triangleRasterize​(Mat vertices,
                                             Mat indices,
                                             Mat colors,
                                             Mat colorBuf,
                                             Mat depthBuf,
                                             Mat world2cam,
                                             double fovY,
                                             double zNear,
                                             double zFar,
                                             TriangleRasterizeSettings settings)
        Renders a set of triangles on a depth and color image Triangles can be drawn white (1.0, 1.0, 1.0), flat-shaded or with a color interpolation between vertices. In flat-shaded mode the 1st vertex color of each triangle is used to fill the whole triangle. The world2cam is an inverted camera pose matrix in fact. It transforms vertices from world to camera coordinate system. The camera coordinate system emulates the OpenGL's coordinate system having coordinate origin in a screen center, X axis pointing right, Y axis pointing up and Z axis pointing towards the viewer except that image is vertically flipped after the render. This means that all visible objects are placed in z-negative area, or exactly in -zNear > z > -zFar since zNear and zFar are positive. For example, at fovY = PI/2 the point (0, 1, -1) will be projected to (width/2, 0) screen point, (1, 0, -1) to (width/2 + height/2, height/2). Increasing fovY makes projection smaller and vice versa. The function does not create or clear output images before the rendering. This means that it can be used for drawing over an existing image or for rendering a model into a 3D scene using pre-filled Z-buffer. Empty scene results in a depth buffer filled by the maximum value since every pixel is infinitely far from the camera. Therefore, before rendering anything from scratch the depthBuf should be filled by zFar values (or by ones in INVDEPTH mode). There are special versions of this function named triangleRasterizeDepth and triangleRasterizeColor for cases if a user needs a color image or a depth image alone; they may run slightly faster.
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        colors - CV_32FC3型または互換の頂点ごとの色。空でもよいし、vertices配列と同じサイズでもよい。値が[0; 1]の範囲外の場合、結果の正しさは保証されない
        colorBuf - 最終的にレンダリングされた画像を表す配列。CV_32FC3値を含み、depthBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。
        depthBuf - 結果のZバッファを含むfloatの配列。float値を含み、colorBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。空のシーンは全ての値がzFar(INVDEPTHモードでは1.0)に設定された状態に対応する
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる
        settings - TriangleRasterizeSettingsを参照。デフォルトではスムースシェーディングが有効で、CWカリング、GL互換は無効。
      • triangleRasterize

        public static void triangleRasterize​(Mat vertices,
                                             Mat indices,
                                             Mat colors,
                                             Mat colorBuf,
                                             Mat depthBuf,
                                             Mat world2cam,
                                             double fovY,
                                             double zNear,
                                             double zFar)
        Renders a set of triangles on a depth and color image Triangles can be drawn white (1.0, 1.0, 1.0), flat-shaded or with a color interpolation between vertices. In flat-shaded mode the 1st vertex color of each triangle is used to fill the whole triangle. The world2cam is an inverted camera pose matrix in fact. It transforms vertices from world to camera coordinate system. The camera coordinate system emulates the OpenGL's coordinate system having coordinate origin in a screen center, X axis pointing right, Y axis pointing up and Z axis pointing towards the viewer except that image is vertically flipped after the render. This means that all visible objects are placed in z-negative area, or exactly in -zNear > z > -zFar since zNear and zFar are positive. For example, at fovY = PI/2 the point (0, 1, -1) will be projected to (width/2, 0) screen point, (1, 0, -1) to (width/2 + height/2, height/2). Increasing fovY makes projection smaller and vice versa. The function does not create or clear output images before the rendering. This means that it can be used for drawing over an existing image or for rendering a model into a 3D scene using pre-filled Z-buffer. Empty scene results in a depth buffer filled by the maximum value since every pixel is infinitely far from the camera. Therefore, before rendering anything from scratch the depthBuf should be filled by zFar values (or by ones in INVDEPTH mode). There are special versions of this function named triangleRasterizeDepth and triangleRasterizeColor for cases if a user needs a color image or a depth image alone; they may run slightly faster.
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        colors - CV_32FC3型または互換の頂点ごとの色。空でもよいし、vertices配列と同じサイズでもよい。値が[0; 1]の範囲外の場合、結果の正しさは保証されない
        colorBuf - 最終的にレンダリングされた画像を表す配列。CV_32FC3値を含み、depthBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。
        depthBuf - 結果のZバッファを含むfloatの配列。float値を含み、colorBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。空のシーンは全ての値がzFar(INVDEPTHモードでは1.0)に設定された状態に対応する
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる。CWカリング、GL互換は無効。
      • triangleRasterizeDepth

        public static void triangleRasterizeDepth​(Mat vertices,
                                                  Mat indices,
                                                  Mat depthBuf,
                                                  Mat world2cam,
                                                  double fovY,
                                                  double zNear,
                                                  double zFar,
                                                  TriangleRasterizeSettings settings)
        Overloaded version of triangleRasterize() with depth-only rendering
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        depthBuf - 結果のZバッファを含むfloatの配列。float値を含み、colorBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。空のシーンは全ての値がzFar(INVDEPTHモードでは1.0)に設定された状態に対応する
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる
        settings - TriangleRasterizeSettingsを参照。デフォルトではスムースシェーディングが有効で、CWカリング、GL互換は無効。
      • triangleRasterizeDepth

        public static void triangleRasterizeDepth​(Mat vertices,
                                                  Mat indices,
                                                  Mat depthBuf,
                                                  Mat world2cam,
                                                  double fovY,
                                                  double zNear,
                                                  double zFar)
        Overloaded version of triangleRasterize() with depth-only rendering
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        depthBuf - 結果のZバッファを含むfloatの配列。float値を含み、colorBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。空のシーンは全ての値がzFar(INVDEPTHモードでは1.0)に設定された状態に対応する
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる。CWカリング、GL互換は無効。
      • triangleRasterizeColor

        public static void triangleRasterizeColor​(Mat vertices,
                                                  Mat indices,
                                                  Mat colors,
                                                  Mat colorBuf,
                                                  Mat world2cam,
                                                  double fovY,
                                                  double zNear,
                                                  double zFar,
                                                  TriangleRasterizeSettings settings)
        Overloaded version of triangleRasterize() with color-only rendering
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        colors - CV_32FC3型または互換の頂点ごとの色。空でもよいし、vertices配列と同じサイズでもよい。値が[0; 1]の範囲外の場合、結果の正しさは保証されない
        colorBuf - 最終的にレンダリングされた画像を表す配列。CV_32FC3値を含み、depthBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる
        settings - TriangleRasterizeSettingsを参照。デフォルトではスムースシェーディングが有効で、CWカリング、GL互換は無効。
      • triangleRasterizeColor

        public static void triangleRasterizeColor​(Mat vertices,
                                                  Mat indices,
                                                  Mat colors,
                                                  Mat colorBuf,
                                                  Mat world2cam,
                                                  double fovY,
                                                  double zNear,
                                                  double zFar)
        Overloaded version of triangleRasterize() with color-only rendering
        引数:
        vertices - 頂点座標の配列。CV_32FC3型または互換の型(例: cv::Vec3fなど)の値を含む必要がある
        indices - 三角形の頂点インデックス配列。三角形1つあたり3個。各インデックスはvertices配列内の頂点を指す。CV_32SC3または互換の値を含む必要がある
        colors - CV_32FC3型または互換の頂点ごとの色。空でもよいし、vertices配列と同じサイズでもよい。値が[0; 1]の範囲外の場合、結果の正しさは保証されない
        colorBuf - 最終的にレンダリングされた画像を表す配列。CV_32FC3値を含み、depthBufと同じサイズである必要がある。レンダリング前にクリアされないため、内容は再利用される(事前レンダリングされたシーンがある場合など)。
        world2cam - 反転(原文ママ!)されたカメラ姿勢を含む4x3または4x4のfloatまたはdouble行列
        fovY - 垂直方向の視野角。ラジアンで指定する
        zNear - レンダリングする最小のZ値。これより近いものはすべてクリップされる
        zFar - レンダリングする最大のZ値。これより遠いものはすべてクリップされる。CWカリング、GL互換は無効。
      • registerDepth

        public static void registerDepth​(Mat unregisteredCameraMatrix,
                                         Mat registeredCameraMatrix,
                                         Mat registeredDistCoeffs,
                                         Mat Rt,
                                         Mat unregisteredDepth,
                                         Size outputImagePlaneSize,
                                         Mat registeredDepth,
                                         boolean depthDilation)
        Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera. uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir Currently does not check for negative depth values.
        引数:
        unregisteredCameraMatrix - 深度カメラのカメラ行列
        registeredCameraMatrix - 外部カメラのカメラ行列
        registeredDistCoeffs - 外部カメラの歪み係数
        Rt - カメラ間の剛体変換。点を深度カメラ座標系から外部カメラ座標系へ変換する。
        unregisteredDepth - 入力深度データ
        outputImagePlaneSize - 外部カメラの画像平面の寸法(幅、高さ)
        registeredDepth - 深度を外部カメラへ変換した結果
        depthDilation - 穴やオクルージョン誤差を避けるために深度を膨張させるかどうか(省略可能)
      • registerDepth

        public static void registerDepth​(Mat unregisteredCameraMatrix,
                                         Mat registeredCameraMatrix,
                                         Mat registeredDistCoeffs,
                                         Mat Rt,
                                         Mat unregisteredDepth,
                                         Size outputImagePlaneSize,
                                         Mat registeredDepth)
        Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera. uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir Currently does not check for negative depth values.
        引数:
        unregisteredCameraMatrix - 深度カメラのカメラ行列
        registeredCameraMatrix - 外部カメラのカメラ行列
        registeredDistCoeffs - 外部カメラの歪み係数
        Rt - カメラ間の剛体変換。点を深度カメラ座標系から外部カメラ座標系へ変換する。
        unregisteredDepth - 入力深度データ
        outputImagePlaneSize - 外部カメラの画像平面の寸法(幅、高さ)
        registeredDepth - 深度を外部カメラへ変換した結果
      • depthTo3dSparse

        public static void depthTo3dSparse​(Mat depth,
                                           Mat in_K,
                                           Mat in_points,
                                           Mat points3d)
        引数:
        depth - 深度画像
        in_K -
        in_points - xy座標のリスト
        points3d - 結果の3D点(点は4チャンネルの値 [x, y, z, 0] で表される)
      • depthTo3d

        public static void depthTo3d​(Mat depth,
                                     Mat K,
                                     Mat points3d,
                                     Mat mask)
        Converts a depth image to 3d points. If the mask is empty then the resulting array has the same dimensions as depth, otherwise it is 1d vector containing mask-enabled values only. The coordinate system is x pointing left, y down and z away from the camera
        引数:
        depth - 深度画像(short int CV_Uとして与えられた場合はミリメートル単位の深度とみなされる(Microsoft Kinectで行われるように)。それ以外でCV_32FまたはCV_64Fとして与えられた場合はメートル単位とみなされる)
        K - キャリブレーション行列
        points3d - 結果の3D点(点は4チャンネルの値 [x, y, z, 0] で表される)。depthがCV_32FまたはCV_64Fの場合はdepthと同じビット深度になり、depthがCV_16UまたはCV_16Sの場合はKのビット深度になる
        mask - 考慮する点のマスク(空でもよい)
      • depthTo3d

        public static void depthTo3d​(Mat depth,
                                     Mat K,
                                     Mat points3d)
        Converts a depth image to 3d points. If the mask is empty then the resulting array has the same dimensions as depth, otherwise it is 1d vector containing mask-enabled values only. The coordinate system is x pointing left, y down and z away from the camera
        引数:
        depth - 深度画像(short int CV_Uとして与えられた場合はミリメートル単位の深度とみなされる(Microsoft Kinectで行われるように)。それ以外でCV_32FまたはCV_64Fとして与えられた場合はメートル単位とみなされる)
        K - キャリブレーション行列
        points3d - 結果の3D点(点は4チャンネルの値 [x, y, z, 0] で表される)。depthがCV_32FまたはCV_64Fの場合はdepthと同じビット深度になり、depthがCV_16UまたはCV_16Sの場合はKのビット深度になる
      • rescaleDepth

        public static void rescaleDepth​(Mat in,
                                        int type,
                                        Mat out,
                                        double depth_factor)
        If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits<float>::quiet_NaN() Otherwise, the image is simply converted to floats
        引数:
        in - 深度画像(short int CV_Uとして与えられた場合はミリメートル単位の深度とみなされ(Microsoft Kinectで行われるように)、メートル単位とみなされる)
        type - 希望する出力のビット深度(CV_32FまたはCV_64F)
        out - 再スケールされたfloat深度画像
        depth_factor - (省略可能)深度を距離に変換する係数(デフォルトはKinectセンサー用に1000.0)
      • rescaleDepth

        public static void rescaleDepth​(Mat in,
                                        int type,
                                        Mat out)
        If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by depth_factor to get a depth in meters, and the values 0 are converted to std::numeric_limits<float>::quiet_NaN() Otherwise, the image is simply converted to floats
        引数:
        in - 深度画像(short int CV_Uとして与えられた場合はミリメートル単位の深度とみなされ(Microsoft Kinectで行われるように)、メートル単位とみなされる)
        type - 希望する出力のビット深度(CV_32FまたはCV_64F)
        out - 再スケールされたfloat深度画像
      • warpFrame

        public static void warpFrame​(Mat depth,
                                     Mat image,
                                     Mat mask,
                                     Mat Rt,
                                     Mat cameraMatrix,
                                     Mat warpedDepth,
                                     Mat warpedImage,
                                     Mat warpedMask)
        Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane. This function can be used to visualize the results of the Odometry algorithm.
        引数:
        depth - 深度データ。1チャンネルのCV_16U、CV_16S、CV_32FまたはCV_64Fである必要がある
        image - RGB画像(省略可能)。1、3または4チャンネルのCV_8Uである必要がある
        mask - 使用するピクセルのマスク(省略可能)。CV_8UC1、CV_8SC1またはCV_BoolC1である必要がある
        Rt - 深度点に適用する回転+並進行列(3x4または4x4)
        cameraMatrix - カメラ内部パラメータ行列(3x3)
        warpedDepth - ワープされた深度データ(省略可能)
        warpedImage - ワープされたRGB画像 (省略可能)
        warpedMask - ワープされた画像における有効なピクセルのマスク (省略可能)
      • warpFrame

        public static void warpFrame​(Mat depth,
                                     Mat image,
                                     Mat mask,
                                     Mat Rt,
                                     Mat cameraMatrix,
                                     Mat warpedDepth,
                                     Mat warpedImage)
        Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane. This function can be used to visualize the results of the Odometry algorithm.
        引数:
        depth - 深度データ。1チャンネルのCV_16U、CV_16S、CV_32FまたはCV_64Fである必要がある
        image - RGB画像(省略可能)。1、3または4チャンネルのCV_8Uである必要がある
        mask - 使用するピクセルのマスク(省略可能)。CV_8UC1、CV_8SC1またはCV_BoolC1である必要がある
        Rt - 深度点に適用する回転+並進行列(3x4または4x4)
        cameraMatrix - カメラ内部パラメータ行列(3x3)
        warpedDepth - ワープされた深度データ(省略可能)
        warpedImage - ワープされたRGB画像 (省略可能)
      • warpFrame

        public static void warpFrame​(Mat depth,
                                     Mat image,
                                     Mat mask,
                                     Mat Rt,
                                     Mat cameraMatrix,
                                     Mat warpedDepth)
        Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane. This function can be used to visualize the results of the Odometry algorithm.
        引数:
        depth - 深度データ。1チャンネルのCV_16U、CV_16S、CV_32FまたはCV_64Fである必要がある
        image - RGB画像(省略可能)。1、3または4チャンネルのCV_8Uである必要がある
        mask - 使用するピクセルのマスク(省略可能)。CV_8UC1、CV_8SC1またはCV_BoolC1である必要がある
        Rt - 深度点に適用する回転+並進行列(3x4または4x4)
        cameraMatrix - カメラ内部パラメータ行列(3x3)
        warpedDepth - ワープされた深度データ(省略可能)
      • warpFrame

        public static void warpFrame​(Mat depth,
                                     Mat image,
                                     Mat mask,
                                     Mat Rt,
                                     Mat cameraMatrix)
        Warps depth or RGB-D image by reprojecting it in 3d, applying Rt transformation and then projecting it back onto the image plane. This function can be used to visualize the results of the Odometry algorithm.
        引数:
        depth - 深度データ。1チャンネルのCV_16U、CV_16S、CV_32FまたはCV_64Fである必要がある
        image - RGB画像(省略可能)。1、3または4チャンネルのCV_8Uである必要がある
        mask - 使用するピクセルのマスク(省略可能)。CV_8UC1、CV_8SC1またはCV_BoolC1である必要がある
        Rt - 深度点に適用する回転+並進行列(3x4または4x4)
        cameraMatrix - カメラ内部パラメータ行列(3x3)
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size,
                                      double threshold,
                                      double sensor_error_a,
                                      double sensor_error_b,
                                      double sensor_error_c,
                                      int method)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
        threshold - ある点が平面に属すると判断するための、点と平面の最大距離 (単位: メートル)
        sensor_error_a - センサ誤差の係数。デフォルトは0で、Kinectでは0.0075を使用する
        sensor_error_b - センサ誤差の係数。デフォルトは0
        sensor_error_c - センサ誤差の係数。デフォルトは0
        method - 平面の計算に使用する手法。
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size,
                                      double threshold,
                                      double sensor_error_a,
                                      double sensor_error_b,
                                      double sensor_error_c)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
        threshold - ある点が平面に属すると判断するための、点と平面の最大距離 (単位: メートル)
        sensor_error_a - センサ誤差の係数。デフォルトは0で、Kinectでは0.0075を使用する
        sensor_error_b - センサ誤差の係数。デフォルトは0
        sensor_error_c - センサ誤差の係数。デフォルトは0
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size,
                                      double threshold,
                                      double sensor_error_a,
                                      double sensor_error_b)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
        threshold - ある点が平面に属すると判断するための、点と平面の最大距離 (単位: メートル)
        sensor_error_a - センサ誤差の係数。デフォルトは0で、Kinectでは0.0075を使用する
        sensor_error_b - センサ誤差の係数。デフォルトは0
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size,
                                      double threshold,
                                      double sensor_error_a)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
        threshold - ある点が平面に属すると判断するための、点と平面の最大距離 (単位: メートル)
        sensor_error_a - センサ誤差の係数。デフォルトは0で、Kinectでは0.0075を使用する
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size,
                                      double threshold)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
        threshold - ある点が平面に属すると判断するための、点と平面の最大距離 (単位: メートル)
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size,
                                      int min_size)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
        min_size - 平面とみなすために必要なクラスタの最小サイズ
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients,
                                      int block_size)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす
        block_size - 安定したMSEを調べる対象となるブロックのサイズ
      • findPlanes

        public static void findPlanes​(Mat points3d,
                                      Mat normals,
                                      Mat mask,
                                      Mat plane_coefficients)
        Find the planes in a depth image
        引数:
        points3d - depth画像と同様に構成された3D点群: rows x cols で3チャンネル
        normals - depth画像内の各点に対する法線。省略可能で、空でもよい
        mask - 各ピクセルがどの平面に属するかでラベル付けされた画像。どの平面にも属さない場合は255となる
        plane_coefficients - 対応する平面の係数 (a,b,c,d)。ax+by+cz+d=0、norm(a,b,c)=1、かつ c < 0 (法線がカメラ方向を向くように) を満たす