Represents the 3D capture result, which can be obtained by calling Camera::capture3D. The 3D data can be in the form of PointZ or PointXYZ and is stored in a 2D array, with each element in the array representing a point. The class also provides methods for saving the point cloud data to a local file.
More...
#include <Frame3D.h>
|
| Frame3D () |
| Constructor.
|
|
| ~Frame3D () |
| Destructor.
|
|
| Frame3D (const Frame3D &other) noexcept |
| Copy constructor.
|
|
Frame3D & | operator= (const Frame3D &other) noexcept |
| Copy assignment.
|
|
Size | imageSize () const |
| Gets the image size of Frame3D.
|
|
bool | isEmpty () const |
| Judges whether Frame3D is empty.
|
|
void | clear () |
| Clears the data in Frame3D and releases the associated resources.
|
|
PointCloud | getUntexturedPointCloud () const |
| Gets the organized 3D data map with a PointXYZ pixel data format. Each point in PointCloud contains the X, Y, and Z data represented in the camera coordinate system. The X, Y, and Z data unit is in mm, and invalid data is in nan.
|
|
PointCloudWithNormals | getUntexturedPointCloudWithNormals () const |
| Gets the organized 3D data map with a PointXYZWithNormals pixel data format. Each point in PointCloudWithNormals contains the X, Y, Z data represented in the camera coordinate system. The X, Y, and Z data unit is in mm, and invalid data is in nan. Normal vectors are computed for each point. If the Frame3D is obtained by Camera::capture3DWithNormal, the normal vectors are computed at the camera side.
|
|
DepthMap | getDepthMap () const |
| Gets the organized 3D data with the PointZ data format. Each point in DepthMap contains the depth (z-coordinate) data in the camera refrence frame. If the application only requires the depth data, obtaining the DepthMap is more efficient. The unit of the depth data is millimeter, and the invalid data is represented by "nan".
|
|
DepthMap | getOrthogonalDepthMap (double &xScale, double &yScale, double &xOffset, double &yOffset) const |
| Obtains the 3D data with the PointZ data format. The 3D data is projected under the orthographic projection camera model. Four parameters are provided to assist in converting depth pixel positions into coordinate values in the camera reference frame according to the following equation: X = col * xScale + xOffset, Y = row * yScale + yOffset.
|
|
ErrorStatus | saveUntexturedPointCloud (FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) const |
| Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, and z fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
|
|
ErrorStatus | saveUntexturedPointCloudWithNormals (FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) const |
| Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, z, normalX, normalY, and normalZ fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
|
|
|
static ErrorStatus | savePointCloud (const PointCloud &pointCloud, FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) |
| Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, and z fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
|
|
static ErrorStatus | savePointCloudWithNormals (const PointCloudWithNormals &pointCloud, FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) |
| Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, z, normalX, normalY, and normalZ fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
|
|
Represents the 3D capture result, which can be obtained by calling Camera::capture3D. The 3D data can be in the form of PointZ or PointXYZ and is stored in a 2D array, with each element in the array representing a point. The class also provides methods for saving the point cloud data to a local file.
Definition at line 105 of file Frame3D.h.
◆ getDepthMap()
DepthMap mmind::eye::Frame3D::getDepthMap |
( |
| ) |
const |
Gets the organized 3D data with the PointZ data format. Each point in DepthMap contains the depth (z-coordinate) data in the camera refrence frame. If the application only requires the depth data, obtaining the DepthMap is more efficient. The unit of the depth data is millimeter, and the invalid data is represented by "nan".
- Returns
- See DepthMap for details.
◆ getOrthogonalDepthMap()
Obtains the 3D data with the PointZ data format. The 3D data is projected under the orthographic projection camera model. Four parameters are provided to assist in converting depth pixel positions into coordinate values in the camera reference frame according to the following equation: X = col * xScale + xOffset, Y = row * yScale + yOffset.
- Parameters
-
[out] | xScale | The output parameter. |
[out] | yScale | The output parameter. |
[out] | xOffset | The output parameter. |
[out] | yOffset | The output parameter. |
- Returns
- See DepthMap for details.
◆ getUntexturedPointCloud()
PointCloud mmind::eye::Frame3D::getUntexturedPointCloud |
( |
| ) |
const |
Gets the organized 3D data map with a PointXYZ pixel data format. Each point in PointCloud contains the X, Y, and Z data represented in the camera coordinate system. The X, Y, and Z data unit is in mm, and invalid data is in nan.
- Returns
- See PointCloud for details.
◆ getUntexturedPointCloudWithNormals()
Gets the organized 3D data map with a PointXYZWithNormals pixel data format. Each point in PointCloudWithNormals contains the X, Y, Z data represented in the camera coordinate system. The X, Y, and Z data unit is in mm, and invalid data is in nan. Normal vectors are computed for each point. If the Frame3D is obtained by Camera::capture3DWithNormal, the normal vectors are computed at the camera side.
- Returns
- See PointCloudWithNormals for details.
◆ savePointCloud()
Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, and z fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
- Parameters
-
[in] | pointCloud | The point cloud data to be saved. See PointCloud for details. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
- Returns
- ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_NO_DATA_ERROR Frame3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error occurred while writing the point cloud file.
◆ savePointCloudWithNormals()
Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, z, normalX, normalY, and normalZ fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
- Parameters
-
[in] | pointCloud | The point cloud data to be saved. See PointCloudWithNormals for details. |
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
- Returns
- ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_NO_DATA_ERROR Frame3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error occurred while writing the point cloud file.
◆ saveUntexturedPointCloud()
ErrorStatus mmind::eye::Frame3D::saveUntexturedPointCloud |
( |
FileFormat | fileFormat, |
|
|
const std::string & | fileName, |
|
|
bool | isOrganized = false ) const |
Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, and z fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
- Parameters
-
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
- Returns
- ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_NO_DATA_ERROR Frame3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error occurred while writing the point cloud file.
◆ saveUntexturedPointCloudWithNormals()
ErrorStatus mmind::eye::Frame3D::saveUntexturedPointCloudWithNormals |
( |
FileFormat | fileFormat, |
|
|
const std::string & | fileName, |
|
|
bool | isOrganized = false ) const |
Saves the untextured point cloud to a file of the input file format and filename. Each point contains x, y, z, normalX, normalY, and normalZ fields. The unit of the coordinate data is millimeter. Point cloud can be saved in organized or unorganized structure with ACSII mode.
- Parameters
-
[in] | fileFormat | The format of the point cloud file. Possible values include PLY, PCD, and CSV. See FileFormat for details. |
[in] | fileName | The filename of the point cloud file. |
[in] | isOrganized | Whether the point cloud is organized. An organized point cloud saves all points in order, with invalid data as nan, and an unorganized point cloud saves only valid points. |
- Returns
- ErrorStatus::MMIND_STATUS_SUCCESS Success.
ErrorStatus::MMIND_STATUS_NO_DATA_ERROR Frame3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error occurred while writing the point cloud file.
◆ CameraImpl
◆ Frame2DAnd3D
◆ InternalInterfaces
The documentation for this class was generated from the following file: