159 lines
8.7 KiB
C
159 lines
8.7 KiB
C
#ifndef _MV3D_RGBD_IMG_PROC_H_
|
||
#define _MV3D_RGBD_IMG_PROC_H_
|
||
|
||
#include "Mv3dRgbdDefine.h"
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief RGBD相机深度图像转换点云图像
|
||
* @param handle [IN] 相机句柄
|
||
* @param pstDepthImage [IN] 深度图数据
|
||
* @param pstPointCloudImage [OUT] 点云图数据
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief depth image convert to pointcloud image
|
||
* @param handle [IN] camera handle
|
||
* @param pstDepthImage [IN] depth data
|
||
* @param pstPointCloudImage [OUT] point cloud data
|
||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_MapDepthToPointCloud(void* handle, MV3D_RGBD_IMAGE_DATA* pstDepthImage, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief RGBD相机深度图像转换点云图像(无句柄)
|
||
* @param pstDepthImage [IN] 深度图数据
|
||
* @param pstCalibInfo [IN] 标定信息
|
||
* @param fZunit [IN] 深度图量纲(mm)
|
||
* @param pstPointCloudImage [OUT] 点云图数据
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief depth image convert to pointcloud image without handle
|
||
* @param pstDepthImage [IN] depth data
|
||
* @param pstCalibInfo [IN] calib info
|
||
* @param fZunit [IN] dimension(mm)
|
||
* @param pstPointCloudImage [OUT] point cloud data
|
||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_MapDepthToPointCloudEx(MV3D_RGBD_IMAGE_DATA* pstDepthImage, MV3D_RGBD_CALIB_INFO* pstCalibInfo, float fZunit, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief 图像坐标系转换
|
||
* @param pstInImage [IN] 输入图像数据
|
||
* @param fZunit [IN] 深度图量纲(mm)
|
||
* @param pstOutImage [OUT] 输出图像数据
|
||
* @param pstCameraParam [IN][OUT] 相机参数
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief image convert coordinate to rgb coordinate
|
||
* @param pstInImage [IN] input image data
|
||
* @param fZunit [IN] dimension(mm)
|
||
* @param pstOutImage [OUT] output image data
|
||
* @param pstCameraParam [IN][OUT] camera param
|
||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ImageCoordinateTrans(MV3D_RGBD_IMAGE_DATA* pstInImage, float fZunit, MV3D_RGBD_IMAGE_DATA* pstOutImage, MV3D_RGBD_CAMERA_PARAM* pstCameraParam);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief 深度图,RGB图和原始图存图接口
|
||
* 深度图格式:C16
|
||
* RGB图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* 原始图格式:Mono8(仅支持bmp格式)
|
||
* @param handle [IN] 相机句柄
|
||
* @param pstImage [IN] 图像数据
|
||
* @param enFileType [IN] 文件类型
|
||
* @param chFileName [IN] 文件名称
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief depth and rgb image save image to file
|
||
* depth image format: C16
|
||
* rgb image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* mono image format: Mono8(only support bmp file type)
|
||
* @param handle [IN] camera handle
|
||
* @param pstImage [IN] image data
|
||
* @param enFileType [IN] file type
|
||
* @param chFileName [IN] file name
|
||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SaveImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, Mv3dRgbdFileType enFileType, const char* chFileName);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief 点云图存图接口
|
||
* @param handle [IN] 相机句柄
|
||
* @param pstImage [IN] 图像数据
|
||
* @param enPointCloudFileType [IN] 点云图文件类型
|
||
* @param chFileName [IN] 文件名称
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief pointcloud image save image to file
|
||
* @param handle [IN] camera handle
|
||
* @param pstImage [IN] image data
|
||
* @param enPointCloudFileType [IN] pointcloud image file type
|
||
* @param chFileName [IN] file name
|
||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SavePointCloudImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, Mv3dRgbdPointCloudFileType enPointCloudFileType, const char* chFileName);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief 纹理点云存图接口
|
||
* 纹理图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* 保存的点云图格式:PLY_ASCII
|
||
* @param handle [IN] 相机句柄
|
||
* @param pstPointCloudImage [IN] 点云图像数据
|
||
* @param pstTexture [IN] 图像纹理数据
|
||
* @param enPointCloudFileType [IN] 点云图文件类型
|
||
* @param chFileName [IN] 文件名称
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief textured pointcloud image save image to file
|
||
* textured image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* saved pointcloud image format: PLY_ASCII
|
||
* @param handle [IN] camera handle
|
||
* @param pstPointCloudImage [IN] pointcloude image data
|
||
* @param pstTexture [IN] image texture data
|
||
* @param enPointCloudFileType [IN] pointcloud image file type
|
||
* @param chFileName [IN] file name
|
||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SaveTexturedPointCloudImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage, MV3D_RGBD_IMAGE_DATA* pstTexture, Mv3dRgbdPointCloudFileType enPointCloudFileType, const char* chFileName);
|
||
|
||
/************************************************************************
|
||
* @~chinese
|
||
* @brief 显示深度和RGB图像接口
|
||
* 深度图格式:C16
|
||
* RGB图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* @param handle [IN] 相机句柄
|
||
* @param pstImage [IN] 图像数据
|
||
* @param hWnd [IN] 窗口句柄
|
||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||
|
||
* @~english
|
||
* @brief display depth and rgb image
|
||
* depth image format: C16
|
||
* rgb image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||
* @param handle [IN] camera handle
|
||
* @param pstImage [IN] image data
|
||
* @param hWnd [IN] windows handle
|
||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||
************************************************************************/
|
||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_DisplayImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, void* hWnd);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
|
||
#endif // _MV3D_RGBD_IMG_PROC_H_
|