Skip to content

Commit

Permalink
lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotScher committed Dec 14, 2024
1 parent 455d941 commit 6832afd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 6 additions & 3 deletions wpical/src/main/native/cpp/WPIcal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ static void DisplayGui() {

int calibrationOutput = fieldcalibration::calibrate(
selected_field_calibration_directory.c_str(), calibration_json_path,
selected_camera_intrinsics, selected_field_map.c_str(), pinnedTag, true);
selected_camera_intrinsics, selected_field_map.c_str(), pinnedTag,
true);

if (calibrationOutput == 1) {
ImGui::OpenPopup("Field Calibration Error");
Expand Down Expand Up @@ -296,7 +297,8 @@ static void DisplayGui() {
if (ImGui::Button("Select Camera Calibration Video")) {
camera_intrinsics_selector = std::make_unique<pfd::open_file>(
"Select Camera Calibration Video", "",
std::vector<std::string>{"Video Files", "*.mp4 *.mov *.m4v *.mkv *.mjpg"},
std::vector<std::string>{"Video Files",
"*.mp4 *.mov *.m4v *.mkv *.mjpg"},
pfd::opt::none);
}

Expand Down Expand Up @@ -352,7 +354,8 @@ static void DisplayGui() {
if (ImGui::Button("Select Camera Calibration Video")) {
camera_intrinsics_selector = std::make_unique<pfd::open_file>(
"Select Camera Calibration Video", "",
std::vector<std::string>{"Video Files", "*.mp4 *.mov *.m4v *.mkv *.mjpg"},
std::vector<std::string>{"Video Files",
"*.mp4 *.mov *.m4v *.mkv *.mjpg"},
pfd::opt::none);
}

Expand Down
9 changes: 5 additions & 4 deletions wpical/src/main/native/cpp/fieldcalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ bool fieldcalibration::process_video_file(
int fieldcalibration::calibrate(std::string input_dir_path,
std::string output_file_path,
std::string camera_model_path,
std::string ideal_map_path, int pinned_tag_id, bool show_debug_window) {
std::string ideal_map_path, int pinned_tag_id,
bool show_debug_window) {
// Silence OpenCV logging
cv::utils::logging::setLogLevel(
cv::utils::logging::LogLevel::LOG_LEVEL_SILENT);
Expand Down Expand Up @@ -454,9 +455,9 @@ int fieldcalibration::calibrate(std::string input_dir_path,

const std::string path = entry.path().string();

bool success = process_video_file(
tag_detector, camera_matrix, camera_distortion, 0.1651,
path, poses, constraints, show_debug_window);
bool success =
process_video_file(tag_detector, camera_matrix, camera_distortion,
0.1651, path, poses, constraints, show_debug_window);

if (!success) {
std::cout << "Unable to process video " << path << std::endl;
Expand Down

0 comments on commit 6832afd

Please sign in to comment.