OSDN Git Service

コンパイルが通るように修正
authorrezoo <rezoolab@gmail.com>
Thu, 22 Oct 2009 17:13:09 +0000 (02:13 +0900)
committerrezoo <rezoolab@gmail.com>
Thu, 22 Oct 2009 17:13:09 +0000 (02:13 +0900)
src/cpp/OMakefile
src/cpp/pdestimator.cpp
src/cpp/pdestimator.h

index b79657d..9c406eb 100644 (file)
@@ -1,4 +1,4 @@
-SRCS = pdcamera pdvideo pdtracker pdutility
+SRCS = pdcamera pdvideo pdtracker pdutility pdestimator
 TARGET = libpaldema
 
 CXXFLAGS += -shared
index 9dde17a..055cfdd 100644 (file)
@@ -34,7 +34,7 @@ CvPoint3D64f Estimator::estimate3DPoint(int t) {
   CvMat* mat_t  = cvCreateMat(2*this->num, 1, CV_64FC1);
   CvMat* mat_Sp = cvCreateMat(3, 1, CV_64FC1);
   
-  for(int i=0; i< this->num, i++){
+  for(int i=0; i< this->num; i++){
     Camera* cam = this->cameras[i];
     CvPoint p   = this->points[i][t];
     
@@ -46,12 +46,12 @@ CvPoint3D64f Estimator::estimate3DPoint(int t) {
     cvmSet(mat_v, 1, 0, (p.y - cam->cy)/cam->fy);
     cvmSet(mat_v, 2, 0, -1.0);
     CvMat* mat_vt = cvCreateMat(3, 1, CV_64FC1);
-    cvScaleAdd(cam->positionVector, -1.0, vat_v, mat_vt);
+    cvSub(mat_v, cam->positionVector, mat_vt);
     
     CvMat* mat_vx = cvCreateMat(1, 3, CV_64FC1);
     CvMat* mat_vy = cvCreateMat(1, 3, CV_64FC1);
     CvMat* mat_vz = cvCreateMat(1, 3, CV_64FC1);
-    cvGEMM(mat_vt, cam->RotationMatrix, 1.0, NULL, 0.0, mat_vz, CV_GEMM_A_T);
+    cvGEMM(mat_vt, cam->rotationMatrix, 1.0, NULL, 0.0, mat_vz, CV_GEMM_A_T);
     cvNormalize(mat_vz, mat_vz);
     double vzx = cvmGet(mat_vz, 0, 0);
     double vzz = cvmGet(mat_vz, 0, 2);
@@ -93,7 +93,7 @@ CvPoint3D64f Estimator::estimate3DPoint(int t) {
   cvReleaseMat(&mat_C_last);
   cvReleaseMat(&mat_C);
   cvReleaseMat(&mat_t);
-  CvPoint3D64f result = CvPoint3D64f(cvmGet(mat_Sp, 0, 0),
+  CvPoint3D64f result = cvPoint3D64f(cvmGet(mat_Sp, 0, 0),
                                      cvmGet(mat_Sp, 1, 0),
                                      cvmGet(mat_Sp, 2, 0));
   cvReleaseMat(&mat_Sp);
index d12f92d..07e6eba 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <cv.h>
 #include <highgui.h>
-#include "pdCamera.h"
+#include "pdcamera.h"
 
 namespace pd {
 
@@ -35,6 +35,6 @@ class Estimator {
     virtual ~Estimator();
     
     CvPoint3D64f estimate3DPoint(int t);
-}
+};
 
-}
\ No newline at end of file
+}