Skip to content

Commit

Permalink
[1.9.x][examples][Transformation.cpp]:adjust tableSize size
Browse files Browse the repository at this point in the history
  • Loading branch information
3Ddaiwei committed Mar 6, 2024
1 parent e86c456 commit a03c348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cpp/Sample-Transformation/Transformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int depthPointCloudTransformation(std::shared_ptr<ob::Device> device, int case_n
uint32_t pointcloudSize = depthWidth * depthHeight * sizeof(OBPoint3f);
uint8_t *pointcloudData = new uint8_t[pointcloudSize];

uint32_t tableSize = depthWidth * depthHeight * 2 * sizeof(float);
uint32_t tableSize = depthWidth * depthHeight * 2;
float * data = new float[tableSize];
OBXYTables xyTables;
if(!ob::CoordinateTransformHelper::transformationInitXYTables(param, OB_SENSOR_DEPTH, data, &tableSize, &xyTables)) {
Expand Down Expand Up @@ -290,7 +290,7 @@ int RGBPointCloudTransformation(std::shared_ptr<ob::Device> device) {
auto param = pipeline->getCalibrationParam(config);
uint32_t colorWidth = colorProfile->width();
uint32_t colorHeight = colorProfile->height();
uint32_t tableSize = colorWidth * colorHeight * 2 * sizeof(float);
uint32_t tableSize = colorWidth * colorHeight * 2;
float * data = new float[tableSize];

uint32_t pointcloudSize = colorWidth * colorHeight * sizeof(OBColorPoint);
Expand Down

0 comments on commit a03c348

Please sign in to comment.