5 #ifndef DAVID_SDK_D4LIB_H
6 #define DAVID_SDK_D4LIB_H
16 #define NULL (void *)0
27 #define D4LIB_API __declspec( dllexport )
31 #define D4LIB_API __declspec( dllimport )
36 #define D4LIB_API __attribute__((visibility("default")))
88 D4LIB_API
int d4lib_init(
const char* licenseKey);
216 D4LIB_API
int d4img_getImageData(d4img_ptr img,
void* data, d4size size,
int pixelFormat);
225 D4LIB_API
int d4img_setImageData(d4img_ptr img,
const void* data, d4size size,
int pixelFormat);
233 D4LIB_API
int d4img_convert(d4img_ptr destImg,
int pixelFormat, d4img_ptr srcImg);
241 D4LIB_API
int d4img_import(d4img_ptr img,
const char* filename);
249 D4LIB_API
int d4img_export(d4img_ptr img,
const char* filename);
260 D4LIB_API
int d4img_computeColorImage(d4img_ptr outputColorImage, d4img_ptr* inputGrayImages,
int inputImageCount);
347 D4LIB_API
int d4fimg_replace(d4fimg_ptr img,
float replaceValue, d4fimg_ptr compare,
float threshold,
int replaceOp);
360 D4LIB_API
int d4fimg_export(d4fimg_ptr img,
const char* filename);
367 D4LIB_API
int d4fimg_import(d4fimg_ptr img,
const char* filename);
427 D4LIB_API
int d4cam_open(d4cam_ptr cam,
const char* name,
int width,
int height,
int pixelFormat,
double fps);
477 D4LIB_API
int d4cam_captureImageAsync(d4cam_ptr cam,
int minContentChange,
double maxWaitTime,
int temporalSmoothCount);
503 D4LIB_API
int d4cam_getImageFormat(d4cam_ptr cam,
int* width,
int* height,
int* pixelFormat,
double* fps);
534 D4LIB_API
int d4cam_getPropertyRange(d4cam_ptr cam,
double* minValue,
double* maxValue,
double* defValue,
double* deltaValue,
const char* name);
551 D4LIB_API
int d4cam_getPropertyName(d4cam_ptr cam,
char* name, d4size maxLength,
int propertyNameIndex,
bool onlyAvailable);
734 d4calib_ptr projectorCalib, d4sls_ptr sls, d4img_ptr* capturedImages,
int imageCount,
735 double scale,
bool compensatePatternOffsets,
int* calibError,
821 D4LIB_API
int d4sls_getPatternImage(d4sls_ptr sls, d4img_ptr img,
int width,
int height,
int pixelFormat,
int patternIndex);
832 D4LIB_API
int d4sls_getSetupImage(d4sls_ptr sls, d4img_ptr img,
int width,
int height,
int pixelFormat);
845 D4LIB_API
int d4sls_getChessboardImage(d4sls_ptr sls, d4img_ptr img,
int width,
int height,
int pixelFormat, d4calib_ptr projectorCalib,
double scale);
859 d4img_ptr* capturedImages,
int imageCount, d4calib_ptr camCalib, d4calib_ptr projectorCalib,
896 D4LIB_API
int d4scan_convertDepthImageToMesh(d4mesh_ptr mesh, d4fimg_ptr depthImage, d4fimg_ptr qualityImage, d4calib_ptr calib,
float minDepth,
float maxDepth,
float depthThres,
float minQuality,
double outlierRemoval);
983 D4LIB_API
int d4mesh_copy(d4mesh_ptr targetMesh, d4mesh_ptr sourceMesh);
990 D4LIB_API
int d4mesh_combine(d4mesh_ptr meshGroup, d4mesh_ptr* meshesToCombine,
int meshCount);
998 D4LIB_API
int d4mesh_uncombine(d4mesh_ptr meshGroup, d4mesh_ptr* uncombinedMeshes,
int meshCount);
1022 D4LIB_API
int d4mesh_getBuffer(d4mesh_ptr mesh,
void* data, d4size size,
int bufferType,
int submeshIndex);
1033 D4LIB_API
int d4mesh_setBuffer(d4mesh_ptr mesh,
const void* data, d4size size,
int bufferType,
int submeshIndex);
1042 D4LIB_API
int d4mesh_hasBuffer(d4mesh_ptr mesh,
bool* hasBuffer,
int bufferType,
int submeshIndex);
1051 D4LIB_API
int d4mesh_getBufferSize(d4mesh_ptr mesh, d4size* size,
int bufferType,
int submeshIndex);
1086 D4LIB_API
int d4mesh_getName(d4mesh_ptr mesh,
char* name, d4size maxLength);
1107 D4LIB_API
int d4mesh_setTexture(d4mesh_ptr mesh, d4img_ptr image,
int submeshIndex);
1114 D4LIB_API
int d4mesh_hasTexture(d4mesh_ptr mesh,
bool* hasTexture,
int submeshIndex);
1141 D4LIB_API
int d4mesh_getPose(d4mesh_ptr mesh,
double world_T_local[16]);
1149 D4LIB_API
int d4mesh_setPose(d4mesh_ptr mesh,
const double world_T_local[16]);
1220 D4LIB_API
int d4mesh_removeVerticesByVirtualCamMask(d4mesh_ptr* meshes,
int meshCount,
const unsigned char* mask,
int width,
int height,
double f,
const double world_T_cam[16],
bool onlyVisible);
1350 D4LIB_API
int d4mesh_fuseGeometry(d4mesh_ptr fusedGeo, d4mesh_ptr* meshes,
int meshCount,
int resolution,
float holeSizeThresRel,
int sharpness);
1366 D4LIB_API
int d4mesh_fuseTexture(d4mesh_ptr fusedGeo, d4mesh_ptr* meshes,
int meshCount);
1388 D4LIB_API
int d4mesh_export(d4mesh_ptr mesh,
const char* filename);
1395 D4LIB_API
int d4mesh_import(d4mesh_ptr mesh,
const char* filename);
1408 #endif // DAVID_SDK_D4LIB_H