···209209 }
210210211211 // If our rgb is not allocated but our gray already is, alloc our rgb
212212- // now. We will hit this path if we receive L8 format.
212212+ // now. We will end up in this path if we receive L8 format.
213213 if (c.gray.cols == cols && c.gray.rows == rows) {
214214 refresh_gui_frame(c, rows, cols);
215215 return;
···352352353353#ifdef SB_CHEESBOARD_CORNERS_MARKER_SUPPORTED
354354 if (c.board.marker) {
355355- // Only available in OpenCV 4.3 and above.
355355+ // Only available in OpenCV 4.3 and newer.
356356 flags += cv::CALIB_CB_MARKER;
357357 }
358358#endif
···2525/*!
2626 * @brief Essential calibration data wrapped for C++.
2727 *
2828- * Just like the cv::Mat that it holds, this object does not own all the memory
2828+ * Like the cv::Mat that it holds, this object does not own all the memory
2929 * it points to!
3030 */
3131struct CameraCalibrationWrapper
···6767/*!
6868 * @brief Essential stereo calibration data wrapped for C++.
6969 *
7070- * Just like the cv::Mat that it holds, this object does not own (all) the
7070+ * Like the cv::Mat that it holds, this object does not own (all) the
7171 * memory it points to!
7272 */
7373struct StereoCameraCalibrationWrapper
···198198199199200200/*!
201201- * @brief Provides cached, precomputed access to normalized image coordinates
202202- * from original, distorted ones.
201201+ * @brief Provides cached, precomputed normalized image coordinates from original, distorted ones.
203202 *
204203 * Populates internal structures using cv::undistortPoints() and performs
205204 * subpixel sampling to interpolate for each query. Essentially, this class lets
+1-1
src/xrt/auxiliary/tracking/t_data_utils.c
···346346{
347347 t_calibration_gui_params_default(p);
348348349349- // Load defaults from file, if it exists. This overwrites the above
349349+ // Load defaults from file, if it exists. This overwrites the preceding
350350 struct u_config_json config_json = {0};
351351352352 u_gui_state_open_file(&config_json);
+1-1
src/xrt/auxiliary/tracking/t_euroc_recorder.cpp
···100100 er->imu_queue.pop();
101101 }
102102103103- // Flush csv streams. Not necessary, just doing it to increase flush frequency
103103+ // Flush csv streams. Not necessary, doing it only to increase flush frequency
104104 er->imu_csv->flush();
105105 er->left_cam_csv->flush();
106106 er->right_cam_csv->flush();
+19-19
src/xrt/auxiliary/tracking/t_file.cpp
···119119 //! @todo for some reason this looks weird?
120120 // Alpha of 1.0 kinda works, not really.
121121 int flags = cv::CALIB_ZERO_DISPARITY;
122122- double balance = 0.0; // aka alpha.
122122+ double balance = 0.0; // also known as alpha.
123123 double fov_scale = 1.0;
124124125125 cv::fisheye::stereoRectify(
···217217 t_stereo_camera_calibration_alloc(&data_ptr, 5); // Hardcoded to 5 distortion parameters.
218218 StereoCameraCalibrationWrapper wrapped(data_ptr);
219219220220- // Dummy matrix
221221- cv::Mat dummy;
220220+ // Scratch-space temporary matrix
221221+ cv::Mat scratch;
222222223223 // Read our calibration from this file
224224 // clang-format off
···229229 result = result && read_cv_mat(calib_file, &wrapped.view[1].distortion_mat, "r_distortion"); // 5 x 1
230230 result = result && read_cv_mat(calib_file, &wrapped.view[0].distortion_fisheye_mat, "l_distortion_fisheye"); // 4 x 1
231231 result = result && read_cv_mat(calib_file, &wrapped.view[1].distortion_fisheye_mat, "r_distortion_fisheye"); // 4 x 1
232232- result = result && read_cv_mat(calib_file, &dummy, "l_rotation"); // 3 x 3
233233- result = result && read_cv_mat(calib_file, &dummy, "r_rotation"); // 3 x 3
234234- result = result && read_cv_mat(calib_file, &dummy, "l_translation"); // empty
235235- result = result && read_cv_mat(calib_file, &dummy, "r_translation"); // empty
236236- result = result && read_cv_mat(calib_file, &dummy, "l_projection"); // 3 x 4
237237- result = result && read_cv_mat(calib_file, &dummy, "r_projection"); // 3 x 4
238238- result = result && read_cv_mat(calib_file, &dummy, "disparity_to_depth"); // 4 x 4
232232+ result = result && read_cv_mat(calib_file, &scratch, "l_rotation"); // 3 x 3
233233+ result = result && read_cv_mat(calib_file, &scratch, "r_rotation"); // 3 x 3
234234+ result = result && read_cv_mat(calib_file, &scratch, "l_translation"); // empty
235235+ result = result && read_cv_mat(calib_file, &scratch, "r_translation"); // empty
236236+ result = result && read_cv_mat(calib_file, &scratch, "l_projection"); // 3 x 4
237237+ result = result && read_cv_mat(calib_file, &scratch, "r_projection"); // 3 x 4
238238+ result = result && read_cv_mat(calib_file, &scratch, "disparity_to_depth"); // 4 x 4
239239 result = result && read_cv_mat(calib_file, &mat_image_size, "mat_image_size");
240240241241 if (!result) {
···447447 CALIB_WARN("Deprecated function: %s", __func__);
448448449449 StereoCameraCalibrationWrapper wrapped(data);
450450- // Dummy matrix
451451- cv::Mat dummy;
450450+ // Scratch-space temporary matrix
451451+ cv::Mat scratch;
452452453453 write_cv_mat(calib_file, &wrapped.view[0].intrinsics_mat);
454454 write_cv_mat(calib_file, &wrapped.view[1].intrinsics_mat);
···456456 write_cv_mat(calib_file, &wrapped.view[1].distortion_mat);
457457 write_cv_mat(calib_file, &wrapped.view[0].distortion_fisheye_mat);
458458 write_cv_mat(calib_file, &wrapped.view[1].distortion_fisheye_mat);
459459- write_cv_mat(calib_file, &dummy); // view[0].rotation_mat
460460- write_cv_mat(calib_file, &dummy); // view[1].rotation_mat
461461- write_cv_mat(calib_file, &dummy); // l_translation
462462- write_cv_mat(calib_file, &dummy); // r_translation
463463- write_cv_mat(calib_file, &dummy); // view[0].projection_mat
464464- write_cv_mat(calib_file, &dummy); // view[1].projection_mat
465465- write_cv_mat(calib_file, &dummy); // disparity_to_depth_mat
459459+ write_cv_mat(calib_file, &scratch); // view[0].rotation_mat
460460+ write_cv_mat(calib_file, &scratch); // view[1].rotation_mat
461461+ write_cv_mat(calib_file, &scratch); // l_translation
462462+ write_cv_mat(calib_file, &scratch); // r_translation
463463+ write_cv_mat(calib_file, &scratch); // view[0].projection_mat
464464+ write_cv_mat(calib_file, &scratch); // view[1].projection_mat
465465+ write_cv_mat(calib_file, &scratch); // disparity_to_depth_mat
466466467467 cv::Mat mat_image_size;
468468 mat_image_size.create(1, 2, CV_32F);
+1-1
src/xrt/auxiliary/tracking/t_imu_fusion.hpp
···268268 return false;
269269 }
270270271271- // Initially, just set it to totally trust gravity.
271271+ // Initially, set it to totally trust gravity.
272272 started_ = true;
273273 quat_ = Eigen::Quaterniond::FromTwoVectors(accel.normalized(), Eigen::Vector3d::UnitY());
274274 accel_filter_.addSample(accel, timestamp);
+2-2
src/xrt/auxiliary/tracking/t_tracker_psmv.cpp
···173173 * computed by your functor.
174174 *
175175 * Having this as a struct with a method, instead of a single "algorithm"-style
176176- * function, allows you to keep your complicated filtering logic in your own
177177- * loop, just calling in when you have a new candidate for "best".
176176+ * function, lets you keep your complicated filtering logic in your own
177177+ * loop, calling in when you have a new candidate for "best".
178178 *
179179 * @note Create by calling make_lowest_score_finder() with your
180180 * function/lambda that takes an element and returns the score, to deduce the
···119119 imu.handleGyro(map_vec3(sample->gyro_rad_secs).cast<double>(), timestamp_ns);
120120 imu.postCorrect();
121121122122- //! @todo use better measurements instead of the above "simple
122122+ //! @todo use better measurements instead of the preceding "simple
123123 //! fusion"
124124 if (filter_time_ns != 0 && filter_time_ns != timestamp_ns) {
125125 float dt = time_ns_to_s(timestamp_ns - filter_time_ns);
+4-5
src/xrt/auxiliary/tracking/t_tracker_psvr.cpp
···197197{
198198 float angle = {}; // angle from reference vector
199199 float distance = {}; // distance from base of reference vector
200200- int32_t vertex_index = {}; // index aka tag
200200+ int32_t vertex_index = {}; // index also known as tag
201201 Eigen::Vector4f position = {}; // 3d position of vertex
202202 blob_point_t src_blob = {}; // blob this vertex was derived from
203203} match_data_t;
···915915 uint32_t matched_vertex_indices[PSVR_NUM_LEDS];
916916917917 // we can early-out if we are 'close enough' to our last match model.
918918- // if we just hold the previous led configuration, this increases
918918+ // if we hold the previous led configuration, this increases
919919 // performance and should cut down on jitter.
920920 if (t.last_optical_model > 0 && t.done_correction) {
921921···12931293 // cv is row, column
12941294 uint8_t *val = src.ptr(curr_y, curr_x);
1295129512961296- // @todo: we are just counting pixels rather
12971297- // than measuring length - bresenhams may introduce some
12981298- // inaccuracy here.
12961296+ /// @todo: we are counting pixels rather than measuring length - bresenhams may introduce some
12971297+ /// inaccuracy here.
12991298 if (*val > 128) {
13001299 (*inside_length) += 1;
13011300 }