From 5ce5c9b3ee559c06bbfc2ad17ff9144f3380ee40 Mon Sep 17 00:00:00 2001 From: Rajat Singhal Date: Mon, 1 Feb 2021 23:16:38 +0530 Subject: [PATCH] Rename writePfmFile to writePFMfile --- AirLib/include/common/common_utils/Utils.hpp | 2 +- Examples/DataCollection/DataCollectorSGM.h | 8 ++++---- Examples/DataCollection/StereoImageGenerator.hpp | 2 +- HelloCar/main.cpp | 2 +- HelloDrone/main.cpp | 2 +- Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AirLib/include/common/common_utils/Utils.hpp b/AirLib/include/common/common_utils/Utils.hpp index 5309d4c312..61181270a4 100644 --- a/AirLib/include/common/common_utils/Utils.hpp +++ b/AirLib/include/common/common_utils/Utils.hpp @@ -678,7 +678,7 @@ class Utils { return uval[0] == 1; } - static void writePfmFile(const float * const image_data, int width, int height, std::string path, float scalef=1) + static void writePFMfile(const float * const image_data, int width, int height, const std::string& path, float scalef=1) { std::fstream file(path.c_str(), std::ios::out | std::ios::binary); diff --git a/Examples/DataCollection/DataCollectorSGM.h b/Examples/DataCollection/DataCollectorSGM.h index b5e228db67..4185f2c4ab 100644 --- a/Examples/DataCollection/DataCollectorSGM.h +++ b/Examples/DataCollection/DataCollectorSGM.h @@ -234,13 +234,13 @@ class DataCollectorSGM { fclose(img_r); //GT disparity and depth - Utils::writePfmFile(gt_depth_data.data(), w, h, FileSystem::combine(result->storage_dir_, depth_gt_file_name)); + Utils::writePFMfile(gt_depth_data.data(), w, h, FileSystem::combine(result->storage_dir_, depth_gt_file_name)); denormalizeDisparity(gt_disparity_data, w); - Utils::writePfmFile(gt_disparity_data.data(), w, h, FileSystem::combine(result->storage_dir_, disparity_gt_file_name)); + Utils::writePFMfile(gt_disparity_data.data(), w, h, FileSystem::combine(result->storage_dir_, disparity_gt_file_name)); //SGM depth disparity and confidence - Utils::writePfmFile(sgm_depth_data.data(), w, h, FileSystem::combine(result->storage_dir_, depth_sgm_file_name)); - Utils::writePfmFile(sgm_disparity_data.data(), w, h, FileSystem::combine(result->storage_dir_, disparity_sgm_file_name)); + Utils::writePFMfile(sgm_depth_data.data(), w, h, FileSystem::combine(result->storage_dir_, depth_sgm_file_name)); + Utils::writePFMfile(sgm_disparity_data.data(), w, h, FileSystem::combine(result->storage_dir_, disparity_sgm_file_name)); FILE *sgm_c = fopen(FileSystem::combine(result->storage_dir_, confidence_sgm_file_name).c_str(), "wb"); svpng(sgm_c,w,h,reinterpret_cast(sgm_confidence_data.data()),0,1); fclose(sgm_c); diff --git a/Examples/DataCollection/StereoImageGenerator.hpp b/Examples/DataCollection/StereoImageGenerator.hpp index 414ad70f0b..4089ade904 100644 --- a/Examples/DataCollection/StereoImageGenerator.hpp +++ b/Examples/DataCollection/StereoImageGenerator.hpp @@ -174,7 +174,7 @@ class StereoImageGenerator { denormalizeDisparity(disparity_data, result.response.at(2).width); - Utils::writePfmFile(disparity_data.data(), result.response.at(2).width, result.response.at(2).height, + Utils::writePFMfile(disparity_data.data(), result.response.at(2).width, result.response.at(2).height, FileSystem::combine(result.storage_dir_, disparity_file_name)); (* result.file_list) << left_file_name << "," << right_file_name << "," << disparity_file_name << std::endl; diff --git a/HelloCar/main.cpp b/HelloCar/main.cpp index 31cfea6775..7bcbb2a52e 100644 --- a/HelloCar/main.cpp +++ b/HelloCar/main.cpp @@ -50,7 +50,7 @@ int main() if (path != "") { std::string file_path = FileSystem::combine(path, std::to_string(image_info.time_stamp)); if (image_info.pixels_as_float) { - Utils::writePfmFile(image_info.image_data_float.data(), image_info.width, image_info.height, + Utils::writePFMfile(image_info.image_data_float.data(), image_info.width, image_info.height, file_path + ".pfm"); } else { diff --git a/HelloDrone/main.cpp b/HelloDrone/main.cpp index 936ec77855..6e0d83574f 100644 --- a/HelloDrone/main.cpp +++ b/HelloDrone/main.cpp @@ -44,7 +44,7 @@ int main() if (path != "") { std::string file_path = FileSystem::combine(path, std::to_string(image_info.time_stamp)); if (image_info.pixels_as_float) { - Utils::writePfmFile(image_info.image_data_float.data(), image_info.width, image_info.height, + Utils::writePFMfile(image_info.image_data_float.data(), image_info.width, image_info.height, file_path + ".pfm"); } else { diff --git a/Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp b/Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp index f195469deb..3cad043b16 100644 --- a/Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp +++ b/Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp @@ -41,7 +41,7 @@ void RecordingFile::appendRecord(const std::vector