The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/tracking: Improve word choice/clarity

+34 -36
+2 -2
src/xrt/auxiliary/tracking/t_calibration.cpp
··· 209 209 } 210 210 211 211 // If our rgb is not allocated but our gray already is, alloc our rgb 212 - // now. We will hit this path if we receive L8 format. 212 + // now. We will end up in this path if we receive L8 format. 213 213 if (c.gray.cols == cols && c.gray.rows == rows) { 214 214 refresh_gui_frame(c, rows, cols); 215 215 return; ··· 352 352 353 353 #ifdef SB_CHEESBOARD_CORNERS_MARKER_SUPPORTED 354 354 if (c.board.marker) { 355 - // Only available in OpenCV 4.3 and above. 355 + // Only available in OpenCV 4.3 and newer. 356 356 flags += cv::CALIB_CB_MARKER; 357 357 } 358 358 #endif
+3 -4
src/xrt/auxiliary/tracking/t_calibration_opencv.hpp
··· 25 25 /*! 26 26 * @brief Essential calibration data wrapped for C++. 27 27 * 28 - * Just like the cv::Mat that it holds, this object does not own all the memory 28 + * Like the cv::Mat that it holds, this object does not own all the memory 29 29 * it points to! 30 30 */ 31 31 struct CameraCalibrationWrapper ··· 67 67 /*! 68 68 * @brief Essential stereo calibration data wrapped for C++. 69 69 * 70 - * Just like the cv::Mat that it holds, this object does not own (all) the 70 + * Like the cv::Mat that it holds, this object does not own (all) the 71 71 * memory it points to! 72 72 */ 73 73 struct StereoCameraCalibrationWrapper ··· 198 198 199 199 200 200 /*! 201 - * @brief Provides cached, precomputed access to normalized image coordinates 202 - * from original, distorted ones. 201 + * @brief Provides cached, precomputed normalized image coordinates from original, distorted ones. 203 202 * 204 203 * Populates internal structures using cv::undistortPoints() and performs 205 204 * subpixel sampling to interpolate for each query. Essentially, this class lets
+1 -1
src/xrt/auxiliary/tracking/t_data_utils.c
··· 346 346 { 347 347 t_calibration_gui_params_default(p); 348 348 349 - // Load defaults from file, if it exists. This overwrites the above 349 + // Load defaults from file, if it exists. This overwrites the preceding 350 350 struct u_config_json config_json = {0}; 351 351 352 352 u_gui_state_open_file(&config_json);
+1 -1
src/xrt/auxiliary/tracking/t_euroc_recorder.cpp
··· 100 100 er->imu_queue.pop(); 101 101 } 102 102 103 - // Flush csv streams. Not necessary, just doing it to increase flush frequency 103 + // Flush csv streams. Not necessary, doing it only to increase flush frequency 104 104 er->imu_csv->flush(); 105 105 er->left_cam_csv->flush(); 106 106 er->right_cam_csv->flush();
+19 -19
src/xrt/auxiliary/tracking/t_file.cpp
··· 119 119 //! @todo for some reason this looks weird? 120 120 // Alpha of 1.0 kinda works, not really. 121 121 int flags = cv::CALIB_ZERO_DISPARITY; 122 - double balance = 0.0; // aka alpha. 122 + double balance = 0.0; // also known as alpha. 123 123 double fov_scale = 1.0; 124 124 125 125 cv::fisheye::stereoRectify( ··· 217 217 t_stereo_camera_calibration_alloc(&data_ptr, 5); // Hardcoded to 5 distortion parameters. 218 218 StereoCameraCalibrationWrapper wrapped(data_ptr); 219 219 220 - // Dummy matrix 221 - cv::Mat dummy; 220 + // Scratch-space temporary matrix 221 + cv::Mat scratch; 222 222 223 223 // Read our calibration from this file 224 224 // clang-format off ··· 229 229 result = result && read_cv_mat(calib_file, &wrapped.view[1].distortion_mat, "r_distortion"); // 5 x 1 230 230 result = result && read_cv_mat(calib_file, &wrapped.view[0].distortion_fisheye_mat, "l_distortion_fisheye"); // 4 x 1 231 231 result = result && read_cv_mat(calib_file, &wrapped.view[1].distortion_fisheye_mat, "r_distortion_fisheye"); // 4 x 1 232 - result = result && read_cv_mat(calib_file, &dummy, "l_rotation"); // 3 x 3 233 - result = result && read_cv_mat(calib_file, &dummy, "r_rotation"); // 3 x 3 234 - result = result && read_cv_mat(calib_file, &dummy, "l_translation"); // empty 235 - result = result && read_cv_mat(calib_file, &dummy, "r_translation"); // empty 236 - result = result && read_cv_mat(calib_file, &dummy, "l_projection"); // 3 x 4 237 - result = result && read_cv_mat(calib_file, &dummy, "r_projection"); // 3 x 4 238 - result = result && read_cv_mat(calib_file, &dummy, "disparity_to_depth"); // 4 x 4 232 + result = result && read_cv_mat(calib_file, &scratch, "l_rotation"); // 3 x 3 233 + result = result && read_cv_mat(calib_file, &scratch, "r_rotation"); // 3 x 3 234 + result = result && read_cv_mat(calib_file, &scratch, "l_translation"); // empty 235 + result = result && read_cv_mat(calib_file, &scratch, "r_translation"); // empty 236 + result = result && read_cv_mat(calib_file, &scratch, "l_projection"); // 3 x 4 237 + result = result && read_cv_mat(calib_file, &scratch, "r_projection"); // 3 x 4 238 + result = result && read_cv_mat(calib_file, &scratch, "disparity_to_depth"); // 4 x 4 239 239 result = result && read_cv_mat(calib_file, &mat_image_size, "mat_image_size"); 240 240 241 241 if (!result) { ··· 447 447 CALIB_WARN("Deprecated function: %s", __func__); 448 448 449 449 StereoCameraCalibrationWrapper wrapped(data); 450 - // Dummy matrix 451 - cv::Mat dummy; 450 + // Scratch-space temporary matrix 451 + cv::Mat scratch; 452 452 453 453 write_cv_mat(calib_file, &wrapped.view[0].intrinsics_mat); 454 454 write_cv_mat(calib_file, &wrapped.view[1].intrinsics_mat); ··· 456 456 write_cv_mat(calib_file, &wrapped.view[1].distortion_mat); 457 457 write_cv_mat(calib_file, &wrapped.view[0].distortion_fisheye_mat); 458 458 write_cv_mat(calib_file, &wrapped.view[1].distortion_fisheye_mat); 459 - write_cv_mat(calib_file, &dummy); // view[0].rotation_mat 460 - write_cv_mat(calib_file, &dummy); // view[1].rotation_mat 461 - write_cv_mat(calib_file, &dummy); // l_translation 462 - write_cv_mat(calib_file, &dummy); // r_translation 463 - write_cv_mat(calib_file, &dummy); // view[0].projection_mat 464 - write_cv_mat(calib_file, &dummy); // view[1].projection_mat 465 - write_cv_mat(calib_file, &dummy); // disparity_to_depth_mat 459 + write_cv_mat(calib_file, &scratch); // view[0].rotation_mat 460 + write_cv_mat(calib_file, &scratch); // view[1].rotation_mat 461 + write_cv_mat(calib_file, &scratch); // l_translation 462 + write_cv_mat(calib_file, &scratch); // r_translation 463 + write_cv_mat(calib_file, &scratch); // view[0].projection_mat 464 + write_cv_mat(calib_file, &scratch); // view[1].projection_mat 465 + write_cv_mat(calib_file, &scratch); // disparity_to_depth_mat 466 466 467 467 cv::Mat mat_image_size; 468 468 mat_image_size.create(1, 2, CV_32F);
+1 -1
src/xrt/auxiliary/tracking/t_imu_fusion.hpp
··· 268 268 return false; 269 269 } 270 270 271 - // Initially, just set it to totally trust gravity. 271 + // Initially, set it to totally trust gravity. 272 272 started_ = true; 273 273 quat_ = Eigen::Quaterniond::FromTwoVectors(accel.normalized(), Eigen::Vector3d::UnitY()); 274 274 accel_filter_.addSample(accel, timestamp);
+2 -2
src/xrt/auxiliary/tracking/t_tracker_psmv.cpp
··· 173 173 * computed by your functor. 174 174 * 175 175 * Having this as a struct with a method, instead of a single "algorithm"-style 176 - * function, allows you to keep your complicated filtering logic in your own 177 - * loop, just calling in when you have a new candidate for "best". 176 + * function, lets you keep your complicated filtering logic in your own 177 + * loop, calling in when you have a new candidate for "best". 178 178 * 179 179 * @note Create by calling make_lowest_score_finder() with your 180 180 * function/lambda that takes an element and returns the score, to deduce the
+1 -1
src/xrt/auxiliary/tracking/t_tracker_psmv_fusion.cpp
··· 119 119 imu.handleGyro(map_vec3(sample->gyro_rad_secs).cast<double>(), timestamp_ns); 120 120 imu.postCorrect(); 121 121 122 - //! @todo use better measurements instead of the above "simple 122 + //! @todo use better measurements instead of the preceding "simple 123 123 //! fusion" 124 124 if (filter_time_ns != 0 && filter_time_ns != timestamp_ns) { 125 125 float dt = time_ns_to_s(timestamp_ns - filter_time_ns);
+4 -5
src/xrt/auxiliary/tracking/t_tracker_psvr.cpp
··· 197 197 { 198 198 float angle = {}; // angle from reference vector 199 199 float distance = {}; // distance from base of reference vector 200 - int32_t vertex_index = {}; // index aka tag 200 + int32_t vertex_index = {}; // index also known as tag 201 201 Eigen::Vector4f position = {}; // 3d position of vertex 202 202 blob_point_t src_blob = {}; // blob this vertex was derived from 203 203 } match_data_t; ··· 915 915 uint32_t matched_vertex_indices[PSVR_NUM_LEDS]; 916 916 917 917 // we can early-out if we are 'close enough' to our last match model. 918 - // if we just hold the previous led configuration, this increases 918 + // if we hold the previous led configuration, this increases 919 919 // performance and should cut down on jitter. 920 920 if (t.last_optical_model > 0 && t.done_correction) { 921 921 ··· 1293 1293 // cv is row, column 1294 1294 uint8_t *val = src.ptr(curr_y, curr_x); 1295 1295 1296 - // @todo: we are just counting pixels rather 1297 - // than measuring length - bresenhams may introduce some 1298 - // inaccuracy here. 1296 + /// @todo: we are counting pixels rather than measuring length - bresenhams may introduce some 1297 + /// inaccuracy here. 1299 1298 if (*val > 128) { 1300 1299 (*inside_length) += 1; 1301 1300 }