diff --git a/examples/cpp/Sample-Transformation/Transformation.cpp b/examples/cpp/Sample-Transformation/Transformation.cpp index 126e279d..d9539bb7 100644 --- a/examples/cpp/Sample-Transformation/Transformation.cpp +++ b/examples/cpp/Sample-Transformation/Transformation.cpp @@ -92,7 +92,7 @@ int depthPointCloudTransformation(std::shared_ptr 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)) { @@ -290,7 +290,7 @@ int RGBPointCloudTransformation(std::shared_ptr 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);