Represents the 2D and 3D scanning result, which can be obtained by calling Camera::capture2DAnd3D or Camera.captureAll2D3DWithNormal. Use a 2D array to represent it while each pixel represents its corresponding 3D data. The 3D data can be in the form of PointZ, PointXYZ, and PointXYZWithNormal. The class supports saving 3D point cloud data to the file.
More...
#include <Frame2DAnd3D.h>
|
| Frame2DAnd3D () |
| Constructor.
|
|
| ~Frame2DAnd3D () |
| Destructor.
|
|
| Frame2DAnd3D (const Frame2DAnd3D &other) noexcept |
| Copy constructor.
|
|
Frame2DAnd3D & | operator= (const Frame2DAnd3D &other) noexcept |
| Copy assignment.
|
|
Frame2D | frame2D () const |
| Gets the Frame2D data part.
|
|
Frame3D | frame3D () const |
| Gets the Frame3D data part.
|
|
void | clear () |
| Clears the data in Frame2DAnd3D and releases the related resources.
|
|
TexturedPointCloud | getTexturedPointCloud () const |
| Gets the pixel-aligned 2D and 3D data with the PointXYZBGR pixel data format. Each point in TexturedPointCloud contains the X, Y, and Z data represented in the camera coordinate system and the texture information. X, Y, and Z data unit is in mm, and invalid data is in nan.
|
|
TexturedPointCloudWithNormals | getTexturedPointCloudWithNormals () const |
| Gets the pixel-aligned 2D and 3D data with the PointXYZBGRWithNormals pixel data format. Each point in TexturedPointCloudWithNormals contains the X, Y, and Z data represented in the camera coordinate system and the texture information. X, Y, and Z data unit is in mm, and invalid data is in nan. Normal vectors are computed for each point. If the Frame2DAnd3D is obtained by Camera::capture2DAnd3DWithNormal, the normal vectors are computed at the camera side.
|
|
ErrorStatus | saveTexturedPointCloud (FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) const |
| Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, and red fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
|
|
ErrorStatus | saveTexturedPointCloudWithNormals (FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) const |
| Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, red, normalX, normalY, and normalZ fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
|
|
|
static ErrorStatus | savePointCloud (const TexturedPointCloud &pointCloud, FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) |
| Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, and red fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
|
|
static ErrorStatus | savePointCloudWithNormals (const TexturedPointCloudWithNormals &pointCloud, FileFormat fileFormat, const std::string &fileName, bool isOrganized=false) |
| Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, red, normalX, normalY, and normalZ fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
|
|
Represents the 2D and 3D scanning result, which can be obtained by calling Camera::capture2DAnd3D or Camera.captureAll2D3DWithNormal. Use a 2D array to represent it while each pixel represents its corresponding 3D data. The 3D data can be in the form of PointZ, PointXYZ, and PointXYZWithNormal. The class supports saving 3D point cloud data to the file.
Definition at line 80 of file Frame2DAnd3D.h.
◆ getTexturedPointCloud()
Gets the pixel-aligned 2D and 3D data with the PointXYZBGR pixel data format. Each point in TexturedPointCloud contains the X, Y, and Z data represented in the camera coordinate system and the texture information. X, Y, and Z data unit is in mm, and invalid data is in nan.
- Returns
- See TexturedPointCloud for details.
◆ getTexturedPointCloudWithNormals()
Gets the pixel-aligned 2D and 3D data with the PointXYZBGRWithNormals pixel data format. Each point in TexturedPointCloudWithNormals contains the X, Y, and Z data represented in the camera coordinate system and the texture information. X, Y, and Z data unit is in mm, and invalid data is in nan. Normal vectors are computed for each point. If the Frame2DAnd3D is obtained by Camera::capture2DAnd3DWithNormal, the normal vectors are computed at the camera side.
- Returns
- See TexturedPointCloudWithNormals for details.
◆ savePointCloud()
static ErrorStatus mmind::eye::Frame2DAnd3D::savePointCloud |
( |
const TexturedPointCloud & |
pointCloud, |
|
|
FileFormat |
fileFormat, |
|
|
const std::string & |
fileName, |
|
|
bool |
isOrganized = false |
|
) |
| |
|
static |
Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, and red fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
- Parameters
-
[in] | pointCloud | The input point cloud. See TexturedPointCloud for details. |
[in] | fileFormat | The output file format, which supports PLY, PCD, and CSV file formats. |
[in] | fileName | The output file name. |
[in] | isOrganized | 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 Frame2DAnd3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error writing point cloud file.
◆ savePointCloudWithNormals()
static ErrorStatus mmind::eye::Frame2DAnd3D::savePointCloudWithNormals |
( |
const TexturedPointCloudWithNormals & |
pointCloud, |
|
|
FileFormat |
fileFormat, |
|
|
const std::string & |
fileName, |
|
|
bool |
isOrganized = false |
|
) |
| |
|
static |
Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, red, normalX, normalY, and normalZ fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
- Parameters
-
[in] | pointCloud | The input point cloud. See TexturedPointCloudWithNormals for details. |
[in] | fileFormat | The output file format, which supports PLY, PCD, and CSV file formats. |
[in] | fileName | The output file name. |
[in] | isOrganized | 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 Frame2DAnd3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error writing point cloud file.
◆ saveTexturedPointCloud()
ErrorStatus mmind::eye::Frame2DAnd3D::saveTexturedPointCloud |
( |
FileFormat |
fileFormat, |
|
|
const std::string & |
fileName, |
|
|
bool |
isOrganized = false |
|
) |
| const |
Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, and red fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
- Parameters
-
[in] | fileFormat | The output file format, which supports PLY, PCD, and CSV file formats. See FileFormat for details. |
[in] | fileName | The output file name. |
[in] | isOrganized | 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 Frame2DAnd3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error writing point cloud file.
◆ saveTexturedPointCloudWithNormals()
ErrorStatus mmind::eye::Frame2DAnd3D::saveTexturedPointCloudWithNormals |
( |
FileFormat |
fileFormat, |
|
|
const std::string & |
fileName, |
|
|
bool |
isOrganized = false |
|
) |
| const |
Saves the textured point cloud to a file with input file format and input file name. Each point contains X, Y, Z, blue, green, red, normalX, normalY, and normalZ fields. The 3D data unit is in mm. Point cloud can be saved in organized or unorganized form with ACSII mode.
- Parameters
-
[in] | fileFormat | The output file format, which supports PLY, PCD, and CSV file formats. See FileFormat for details. |
[in] | fileName | The output file name. |
[in] | isOrganized | 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 Frame2DAnd3D is empty.
ErrorStatus::MMIND_STATUS_FILE_IO_ERROR Error writing point cloud file.
◆ CameraImpl
The documentation for this class was generated from the following file: