[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59958] branches/soc-2013-motion_track/ extern/libmv/libmv/simple_pipeline: Code cleanup: Google-style constant names
Joseph Mansfield
sftrabbit at gmail.com
Mon Sep 9 16:50:32 CEST 2013
Revision: 59958
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59958
Author: sftrabbit
Date: 2013-09-09 14:50:31 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
Code cleanup: Google-style constant names
Google style guide recommends kConstantName for constants.
Modified Paths:
--------------
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/modal_solver.cc
Modified: branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc
===================================================================
--- branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc 2013-09-09 14:26:39 UTC (rev 59957)
+++ branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/keyframe_selection.cc 2013-09-09 14:50:31 UTC (rev 59958)
@@ -297,8 +297,8 @@
//
// http://www.cs.ait.ac.th/~mdailey/papers/Tahir-KeyFrame.pdf
- static const int SELECTION_CAMERA = 0;
- const CameraIntrinsics &selection_intrinsics = intrinsics[SELECTION_CAMERA];
+ static const int kSelectionCamera = 0;
+ const CameraIntrinsics &selection_intrinsics = intrinsics[kSelectionCamera];
int max_image = tracks.MaxImage();
int next_keyframe = 1;
@@ -332,16 +332,16 @@
candidate_image++) {
// Conjunction of all markers from both keyframes
vector<Marker> all_markers =
- tracks.MarkersInBothImages(SELECTION_CAMERA, current_keyframe, candidate_image);
+ tracks.MarkersInBothImages(kSelectionCamera, current_keyframe, candidate_image);
// Match keypoints between frames current_keyframe and candidate_image
vector<Marker> tracked_markers =
- tracks.MarkersForTracksInBothImages(SELECTION_CAMERA, current_keyframe, candidate_image);
+ tracks.MarkersForTracksInBothImages(kSelectionCamera, current_keyframe, candidate_image);
// Correspondences in normalized space
Mat x1, x2;
- CoordinatesForMarkersInImage(tracked_markers, SELECTION_CAMERA, current_keyframe, &x1);
- CoordinatesForMarkersInImage(tracked_markers, SELECTION_CAMERA, candidate_image, &x2);
+ CoordinatesForMarkersInImage(tracked_markers, kSelectionCamera, current_keyframe, &x1);
+ CoordinatesForMarkersInImage(tracked_markers, kSelectionCamera, candidate_image, &x2);
LG << "Found " << x1.cols()
<< " correspondences between " << current_keyframe
@@ -446,10 +446,10 @@
<< "\nt:" << t.transpose();
// First camera is identity, second one is relative to it
- reconstruction.InsertView(SELECTION_CAMERA, current_keyframe,
+ reconstruction.InsertView(kSelectionCamera, current_keyframe,
Mat3::Identity(),
Vec3::Zero());
- reconstruction.InsertView(SELECTION_CAMERA, candidate_image, R, t);
+ reconstruction.InsertView(kSelectionCamera, candidate_image, R, t);
// Reconstruct 3D points
int intersects_total = 0, intersects_success = 0;
Modified: branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/modal_solver.cc
===================================================================
--- branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/modal_solver.cc 2013-09-09 14:26:39 UTC (rev 59957)
+++ branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/modal_solver.cc 2013-09-09 14:50:31 UTC (rev 59958)
@@ -99,7 +99,7 @@
void ModalSolver(const Tracks &tracks,
EuclideanReconstruction *reconstruction,
ProgressUpdateCallback *update_callback) {
- static const int MODAL_CAMERA = 0;
+ static const int kModalCamera = 0;
int max_image = tracks.MaxImage();
int max_track = tracks.MaxTrack();
@@ -112,7 +112,7 @@
ceres::AngleAxisToQuaternion(&zero_rotation(0), &quaternion(0));
for (int image = 0; image <= max_image; ++image) {
- vector<Marker> all_markers = tracks.MarkersInImage(MODAL_CAMERA, image);
+ vector<Marker> all_markers = tracks.MarkersInImage(kModalCamera, image);
ModalSolverLogProress(update_callback, (float) image / max_image);
@@ -218,7 +218,7 @@
// Convert quaternion to rotation matrix.
Mat3 R;
ceres::QuaternionToRotation(&quaternion(0), &R(0, 0));
- reconstruction->InsertView(MODAL_CAMERA, image, R, Vec3::Zero());
+ reconstruction->InsertView(kModalCamera, image, R, Vec3::Zero());
// STEP 3: reproject all new markers appeared at image
@@ -226,7 +226,7 @@
// and reproject them on sphere to obtain 3D position/
for (int track = 0; track <= max_track; ++track) {
if (!reconstruction->PointForTrack(track)) {
- Marker marker = tracks.MarkerInImageForTrack(MODAL_CAMERA, image, track);
+ Marker marker = tracks.MarkerInImageForTrack(kModalCamera, image, track);
if (marker.image == image) {
// New track appeared on this image,
More information about the Bf-blender-cvs
mailing list