Skip to content

Commit

Permalink
Add explicit documentation about loadMesh behavior; specify that only…
Browse files Browse the repository at this point in the history
… the first 8 distortion coefficients are used
  • Loading branch information
SzabolcsGergely committed Apr 21, 2022
1 parent 9e64860 commit abfbd6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/depthai/pipeline/node/StereoDepth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class StereoDepth : public NodeCRTP<Node, StereoDepth, StereoDepthProperties> {
* Specify local filesystem paths to the mesh calibration files for 'left' and 'right' inputs.
*
* When a mesh calibration is set, it overrides the camera intrinsics/extrinsics matrices.
* Overrides useHomographyRectification behavior.
* Mesh format: a sequence of (y,x) points as 'float' with coordinates from the input image
* to be mapped in the output. The mesh can be subsampled, configured by `setMeshStep`.
*
Expand All @@ -160,6 +161,7 @@ class StereoDepth : public NodeCRTP<Node, StereoDepth, StereoDepthProperties> {

/**
* Specify mesh calibration data for 'left' and 'right' inputs, as vectors of bytes.
* Overrides useHomographyRectification behavior.
* See `loadMeshFiles` for the expected data format
*/
void loadMeshData(const std::vector<std::uint8_t>& dataLeft, const std::vector<std::uint8_t>& dataRight);
Expand Down Expand Up @@ -322,7 +324,8 @@ class StereoDepth : public NodeCRTP<Node, StereoDepth, StereoDepthProperties> {
* @param useHomographyRectification true: 3x3 homography matrix generated from calibration data is used for stereo rectification, can't correct lens
* distortion.
* false: sparse mesh is generated on-device from calibration data with mesh step specified with setMeshStep (Default: (16, 16)), can correct lens
* distortion. Implementation for generating the mesh is same as opencv's initUndistortRectifyMap function.
* distortion. Implementation for generating the mesh is same as opencv's initUndistortRectifyMap function. Only the first 8 distortion coefficients are
* used from calibration data.
*/
void useHomographyRectification(bool useHomographyRectification);
};
Expand Down

0 comments on commit abfbd6a

Please sign in to comment.