Skip to content

Commit

Permalink
Rename writePfmFile to writePFMfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 committed Feb 1, 2021
1 parent bd2dcc4 commit 5ce5c9b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AirLib/include/common/common_utils/Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions Examples/DataCollection/DataCollectorSGM.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<const unsigned char*>(sgm_confidence_data.data()),0,1);
fclose(sgm_c);
Expand Down
2 changes: 1 addition & 1 deletion Examples/DataCollection/StereoImageGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion HelloCar/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion HelloDrone/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void RecordingFile::appendRecord(const std::vector<msr::airlib::ImageCaptureBase
//write image file
try {
if (extension == ".pfm") {
common_utils::Utils::writePfmFile(response.image_data_float.data(), response.width, response.height,
common_utils::Utils::writePFMfile(response.image_data_float.data(), response.width, response.height,
image_full_file_path);
}
else if (extension == ".ppm") {
Expand Down

0 comments on commit 5ce5c9b

Please sign in to comment.