From 3f5d3b2d40c4dc94ce91e113b376eaeb5caf4fb6 Mon Sep 17 00:00:00 2001 From: edgarriba Date: Fri, 8 Aug 2014 15:36:27 +0200 Subject: [PATCH] video opening path modified --- .../calib3d/real_time_pose_estimation/src/main_detection.cpp | 11 ++++++++--- .../real_time_pose_estimation/src/main_registration.cpp | 8 +++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp index 85272f9..e5cf965 100644 --- a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp +++ b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp @@ -14,11 +14,16 @@ #include "ModelRegistration.h" #include "Utils.h" +std::string tutorial_path = "../../samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/"; + +// COOKIES VIDEO +std::string video_read_path = tutorial_path + "Data/box.mp4"; // mesh + // COOKIES BOX - ORB -std::string yml_read_path = "../Data/cookies_ORB.yml"; // 3dpts + descriptors +std::string yml_read_path = tutorial_path + "Data/cookies_ORB.yml"; // 3dpts + descriptors // COOKIES BOX MESH -std::string ply_read_path = "../Data/box.ply"; // mesh +std::string ply_read_path = tutorial_path + "Data/box.ply"; // mesh void help() { @@ -156,7 +161,7 @@ int main(int argc, char *argv[]) cv::VideoCapture cap; // instantiate VideoCapture - (argc < 2) ? cap.open(1) : cap.open(argv[1]); // open the default camera device + (argc < 2) ? cap.open(video_read_path) : cap.open(argv[1]); // open the default camera device // or a recorder video if(!cap.isOpened()) // check if we succeeded diff --git a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp index 3b2517b..c3f6ab6 100644 --- a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp +++ b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp @@ -17,14 +17,16 @@ * Set up the images paths */ + std::string tutorial_path = "../../samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/"; + // COOKIES BOX [718x480] - std::string img_path = "../Data/resized_IMG_3875.JPG"; // f 55 + std::string img_path = tutorial_path + "Data/resized_IMG_3875.JPG"; // f 55 // COOKIES BOX MESH - std::string ply_read_path = "../Data/box.ply"; + std::string ply_read_path = tutorial_path + "Data/box.ply"; // YAML writting path - std::string write_path = "../Data/cookies_ORB.yml"; + std::string write_path = tutorial_path + "Data/cookies_ORB.yml"; void help() { -- 2.7.4