[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58913] branches/soc-2013-motion_track: Change from multiview to multicamera terminology
Joseph Mansfield
sftrabbit at gmail.com
Mon Aug 5 01:17:28 CEST 2013
Revision: 58913
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58913
Author: sftrabbit
Date: 2013-08-04 23:17:27 +0000 (Sun, 04 Aug 2013)
Log Message:
-----------
Change from multiview to multicamera terminology
All 3D reconstruction is multiview reconstruction. A better, unambigious term for reconstructing multiple cameras is multicamera reconstruction, so change all references to "views" to "cameras".
Unfortunately, this introduces some confusion in simple_pipeline/reconstruction.h, but I'm currently discussing this with Keir.
Modified Paths:
--------------
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/pipeline.cc
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.cc
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.h
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/resect.cc
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/tracks.cc
branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/tracks.h
branches/soc-2013-motion_track/extern/libmv/libmv-capi.cc
branches/soc-2013-motion_track/extern/libmv/libmv-capi.h
branches/soc-2013-motion_track/extern/libmv/libmv-capi_stub.cc
branches/soc-2013-motion_track/source/blender/blenkernel/intern/tracking.c
Modified: branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/pipeline.cc
===================================================================
--- branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/pipeline.cc 2013-08-04 22:37:22 UTC (rev 58912)
+++ branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/pipeline.cc 2013-08-04 23:17:27 UTC (rev 58913)
@@ -169,7 +169,7 @@
vector<Marker> reconstructed_markers;
for (int i = 0; i < all_markers.size(); ++i) {
- if (reconstruction->CameraForImage(all_markers[i].view, all_markers[i].image)) {
+ if (reconstruction->CameraForImage(all_markers[i].camera, all_markers[i].image)) {
reconstructed_markers.push_back(all_markers[i]);
}
}
Modified: branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.cc
===================================================================
--- branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.cc 2013-08-04 22:37:22 UTC (rev 58912)
+++ branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.cc 2013-08-04 23:17:27 UTC (rev 58913)
@@ -42,22 +42,22 @@
return *this;
}
-void EuclideanReconstruction::InsertCamera(int view,
+void EuclideanReconstruction::InsertCamera(int camera,
int image,
const Mat3 &R,
const Vec3 &t) {
- LG << "InsertCamera view " << view << ", image " << image
+ LG << "InsertCamera camera " << camera << ", image " << image
<< ":\nR:\n"<< R << "\nt:\n" << t;
- if (view >= cameras_.size()) {
- cameras_.resize(view + 1);
+ if (camera >= cameras_.size()) {
+ cameras_.resize(camera + 1);
}
- if (image >= cameras_[view].size()) {
- cameras_[view].resize(image + 1);
+ if (image >= cameras_[camera].size()) {
+ cameras_[camera].resize(image + 1);
}
- cameras_[view][image].view = view;
- cameras_[view][image].image = image;
- cameras_[view][image].R = R;
- cameras_[view][image].t = t;
+ cameras_[camera][image].camera = camera;
+ cameras_[camera][image].image = image;
+ cameras_[camera][image].R = R;
+ cameras_[camera][image].t = t;
}
void EuclideanReconstruction::InsertPoint(int track, const Vec3 &X) {
@@ -70,23 +70,23 @@
}
EuclideanCamera *EuclideanReconstruction::CameraForImage(
- int view, int image) {
+ int camera, int image) {
return const_cast<EuclideanCamera *>(
static_cast<const EuclideanReconstruction *>(
- this)->CameraForImage(view, image));
+ this)->CameraForImage(camera, image));
}
const EuclideanCamera *EuclideanReconstruction::CameraForImage(
- int view, int image) const {
- if (view < 0 || view >= cameras_.size() ||
- image < 0 || image >= cameras_[view].size()) {
+ int camera, int image) const {
+ if (camera < 0 || camera >= cameras_.size() ||
+ image < 0 || image >= cameras_[camera].size()) {
return NULL;
}
- const EuclideanCamera *camera = &cameras_[view][image];
- if (camera->view == -1 || camera->image == -1) {
+ const EuclideanCamera *camera_pose = &cameras_[camera][image];
+ if (camera_pose->camera == -1 || camera_pose->image == -1) {
return NULL;
}
- return camera;
+ return camera_pose;
}
std::vector<vector<EuclideanCamera> > EuclideanReconstruction::AllCameras(
@@ -95,7 +95,7 @@
cameras.resize(cameras_.size());
for (int i = 0; i < cameras_.size(); ++i) {
for (int j = 0; j < cameras_[i].size(); ++j) {
- if (cameras[i][j].view != -1 && cameras_[i][j].image != -1) {
+ if (cameras[i][j].camera != -1 && cameras_[i][j].image != -1) {
cameras[i].push_back(cameras_[i][j]);
}
}
@@ -104,12 +104,12 @@
}
vector<EuclideanCamera> EuclideanReconstruction::AllCamerasForView(
- int view) const {
+ int camera) const {
vector<EuclideanCamera> cameras;
- if (view >= 0 && view < cameras.size()) {
- for (int i = 0; i < cameras_[view].size(); ++i) {
- if (cameras_[view][i].view != -1 && cameras_[view][i].image != -1) {
- cameras.push_back(cameras_[view][i]);
+ if (camera >= 0 && camera < cameras.size()) {
+ for (int i = 0; i < cameras_[camera].size(); ++i) {
+ if (cameras_[camera][i].camera != -1 && cameras_[camera][i].image != -1) {
+ cameras.push_back(cameras_[camera][i]);
}
}
}
@@ -142,19 +142,19 @@
return points;
}
-void ProjectiveReconstruction::InsertCamera(int view, int image,
+void ProjectiveReconstruction::InsertCamera(int camera, int image,
const Mat34 &P) {
- LG << "InsertCamera view " << view << ", image " << image
+ LG << "InsertCamera camera " << camera << ", image " << image
<< ":\nP:\n"<< P;
- if (view >= cameras_.size()) {
- cameras_.resize(view + 1);
+ if (camera >= cameras_.size()) {
+ cameras_.resize(camera + 1);
}
- if (image >= cameras_[view].size()) {
- cameras_[view].resize(image + 1);
+ if (image >= cameras_[camera].size()) {
+ cameras_[camera].resize(image + 1);
}
- cameras_[view][image].view = view;
- cameras_[view][image].image = image;
- cameras_[view][image].P = P;
+ cameras_[camera][image].camera = camera;
+ cameras_[camera][image].image = image;
+ cameras_[camera][image].P = P;
}
void ProjectiveReconstruction::InsertPoint(int track, const Vec4 &X) {
@@ -166,23 +166,23 @@
points_[track].X = X;
}
-ProjectiveCamera *ProjectiveReconstruction::CameraForImage(int view, int image) {
+ProjectiveCamera *ProjectiveReconstruction::CameraForImage(int camera, int image) {
return const_cast<ProjectiveCamera *>(
static_cast<const ProjectiveReconstruction *>(
- this)->CameraForImage(view, image));
+ this)->CameraForImage(camera, image));
}
const ProjectiveCamera *ProjectiveReconstruction::CameraForImage(
- int view, int image) const {
- if (view < 0 || view >= cameras_.size() ||
- image < 0 || image >= cameras_[view].size()) {
+ int camera, int image) const {
+ if (camera < 0 || camera >= cameras_.size() ||
+ image < 0 || image >= cameras_[camera].size()) {
return NULL;
}
- const ProjectiveCamera *camera = &cameras_[view][image];
- if (camera->view == -1 || camera->image == -1) {
+ const ProjectiveCamera *camera_pose = &cameras_[camera][image];
+ if (camera_pose->camera == -1 || camera_pose->image == -1) {
return NULL;
}
- return camera;
+ return camera_pose;
}
std::vector<vector<ProjectiveCamera> > ProjectiveReconstruction::AllCameras() const {
@@ -190,7 +190,7 @@
cameras.resize(cameras_.size());
for (int i = 0; i < cameras_.size(); ++i) {
for (int j = 0; j < cameras_[i].size(); ++j) {
- if (cameras[i][j].view != 1 && cameras_[i][j].image != -1) {
+ if (cameras[i][j].camera != 1 && cameras_[i][j].image != -1) {
cameras[i].push_back(cameras_[i][j]);
}
}
@@ -199,12 +199,12 @@
}
vector<ProjectiveCamera> ProjectiveReconstruction::AllCamerasForView(
- int view) const {
+ int camera) const {
vector<ProjectiveCamera> cameras;
- if (view < cameras_.size()) {
- for (int i = 0; i < cameras_[view].size(); ++i) {
- if (cameras_[view][i].view != -1 && cameras_[view][i].image != -1) {
- cameras.push_back(cameras_[view][i]);
+ if (camera < cameras_.size()) {
+ for (int i = 0; i < cameras_[camera].size(); ++i) {
+ if (cameras_[camera][i].camera != -1 && cameras_[camera][i].image != -1) {
+ cameras.push_back(cameras_[camera][i]);
}
}
}
Modified: branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.h
===================================================================
--- branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.h 2013-08-04 22:37:22 UTC (rev 58912)
+++ branches/soc-2013-motion_track/extern/libmv/libmv/simple_pipeline/reconstruction.h 2013-08-04 23:17:27 UTC (rev 58913)
@@ -41,10 +41,10 @@
/*!
A EuclideanCamera is the location and rotation of the camera viewing an
- \a image from a \a view. All EuclideanCameras with the same \a view
+ \a image from a \a camera. All EuclideanCameras with the same \a camera
represent the motion of a particular camera across all images.
- \a view identify which view from \l Tracks this camera represents.
+ \a camera identify which camera from \l Tracks this camera represents.
\a image identify which image from \l Tracks this camera represents.
\a R is a 3x3 matrix representing the rotation of the camera.
\a t is a translation vector representing its positions.
@@ -52,11 +52,11 @@
\sa Reconstruction
*/
struct EuclideanCamera {
- EuclideanCamera() : view(-1), image(-1) {}
+ EuclideanCamera() : camera(-1), image(-1) {}
EuclideanCamera(const EuclideanCamera &c)
- : view(c.view), image(c.image), R(c.R), t(c.t) {}
+ : camera(c.camera), image(c.image), R(c.R), t(c.t) {}
- int view;
+ int camera;
int image;
Mat3 R;
Vec3 t;
@@ -84,7 +84,7 @@
The EuclideanReconstruction container is intended as the store of 3D
reconstruction data to be used with the MultiView API.
- The container has lookups to query a \a EuclideanCamera from an \a view
+ The container has lookups to query a \a EuclideanCamera from an \a camera
and \a image, or a \a EuclideanPoint from a \a track.
\sa Camera, Point
@@ -101,16 +101,16 @@
/*!
Insert a camera into the set. If there is already a camera for the given
- \a view and \a image, the existing camera is replaced. If there is no camera
- for the given \a view and \a image, a new one is added.
+ \a camera and \a image, the existing camera is replaced. If there is no
+ camera for the given \a camera and \a image, a new one is added.
- \a view and \a image are the keys used to retrieve the cameras with the other
- methods in this class.
+ \a camera and \a image are the keys used to retrieve the cameras with the
+ other methods in this class.
- \note You should use the same \a view and \a image identifiers as in
+ \note You should use the same \a camera and \a image identifiers as in
\l Tracks.
*/
- void InsertCamera(int view, int image, const Mat3 &R, const Vec3 &t);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list