Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion applications/camera_calibration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,25 @@ if (CMAKE_CUDA_COMPILER)
set_target_properties(camera_calibration PROPERTIES
POSITION_INDEPENDENT_CODE ON
)


# Tool for generating visualizations from reprojection error data provided by other software
add_executable(report_from_data
src/camera_calibration/report_from_data.cc
)
target_include_directories(report_from_data PRIVATE
src
third_party/yaml-cpp-0.6.0/include
)
target_link_libraries(report_from_data PRIVATE
camera_calibration_baselib
${Boost_LIBRARIES}
yaml-cpp2
libvis_external_io
)
set_target_properties(report_from_data PROPERTIES
POSITION_INDEPENDENT_CODE ON
)


# Resource files for unit tests
ADD_CUSTOM_TARGET(camera_calibration_test_resources ALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ void RunBundleAdjustment(
// Save the optimization state
if (state_output_path) {
SaveBAState(state_output_path, *state);
SaveDatasetAndState(state_output_path, *dataset, *state);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving the dataset to the state_output_path each time that the state is saved would be a behavior change. I think that such a behavior should either be behind a specific flag (e.g., save_dataset_with_state) or the state_output_path should be renamed to fit its changed semantic.

}

// Beautify all camera orientations
Expand Down Expand Up @@ -1115,7 +1116,11 @@ bool Calibrate(
}

if (dataset_output_path) {
SaveDataset(dataset_output_path, *dataset);
SaveDatasetAndState(dataset_output_path, *dataset, *state);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, a similar comment applies as above, since this would now always save the state with the dataset. Also for the two instances below.

LOG(INFO) << "Saved dataset at " << dataset_output_path;
}
else {
LOG(INFO) << "Didn't save dataset";
}
}

Expand Down Expand Up @@ -1322,10 +1327,10 @@ void CalibrateBatch(

// Save the resulting calibration.
if (!state_output_directory.empty()) {
SaveBAState(state_output_directory.c_str(), calibration);
SaveDatasetAndState(state_output_directory.c_str(), dataset, calibration);
}
if (!pruned_dataset_output_path.empty()) {
SaveDataset(pruned_dataset_output_path.c_str(), dataset);
SaveDatasetAndState(pruned_dataset_output_path.c_str(), dataset, calibration);
}

// Create the calibration error report.
Expand Down
Loading