Commit 8c4b8cc0 authored by edgarriba's avatar edgarriba

fixed warnings

parent 3f5d3b2d
......@@ -13,9 +13,15 @@
#include <opencv2/calib3d/calib3d.hpp>
/* Functions headers */
cv::Point3f CROSS(cv::Point3f v1, cv::Point3f v2);
double DOT(cv::Point3f v1, cv::Point3f v2);
cv::Point3f SUB(cv::Point3f v1, cv::Point3f v2);
cv::Point3f get_nearest_3D_point(std::vector<cv::Point3f> &points_list, cv::Point3f origin);
/* Functions for Möller–Trumbore intersection algorithm */
/* Functions for Möller–Trumbore intersection algorithm
* */
cv::Point3f CROSS(cv::Point3f v1, cv::Point3f v2)
{
cv::Point3f tmp_p;
......
......@@ -50,4 +50,9 @@ private:
cv::Mat _P_matrix;
};
// Functions for Möller–Trumbore intersection algorithm
cv::Point3f CROSS(cv::Point3f v1, cv::Point3f v2);
double DOT(cv::Point3f v1, cv::Point3f v2);
cv::Point3f SUB(cv::Point3f v1, cv::Point3f v2);
#endif /* PNPPROBLEM_H_ */
......@@ -113,9 +113,9 @@ void RobustMatcher::robustMatch( const cv::Mat& frame, std::vector<cv::DMatch>&
// 3. Remove matches for which NN ratio is > than threshold
// clean image 1 -> image 2 matches
int removed1 = ratioTest(matches12);
ratioTest(matches12);
// clean image 2 -> image 1 matches
int removed2 = ratioTest(matches21);
ratioTest(matches21);
// 4. Remove non-symmetrical matches
symmetryTest(matches12, matches21, good_matches);
......@@ -140,7 +140,7 @@ void RobustMatcher::fastRobustMatch( const cv::Mat& frame, std::vector<cv::DMatc
matcher_->knnMatch(descriptors_frame, descriptors_model, matches, 2);
// 3. Remove matches for which NN ratio is > than threshold
int removed = ratioTest(matches);
ratioTest(matches);
// 4. Fill good matches container
for ( std::vector<std::vector<cv::DMatch> >::iterator
......
......@@ -114,7 +114,7 @@ void drawArrow(cv::Mat image, cv::Point2i p, cv::Point2i q, cv::Scalar color, in
{
//Draw the principle line
cv::line(image, p, q, color, thickness, line_type, shift);
const double PI = 3.141592653;
const double PI = CV_PI;
//compute the angle alpha
double angle = atan2((double)p.y-q.y, (double)p.x-q.x);
//compute the coordinates of the first segment
......@@ -137,9 +137,6 @@ void draw3DCoordinateAxes(cv::Mat image, const std::vector<cv::Point2f> &list_po
cv::Scalar blue(255,0,0);
cv::Scalar black(0,0,0);
const double PI = 3.141592653;
int length = 50;
cv::Point2i origin = list_points2d[0];
cv::Point2i pointX = list_points2d[1];
cv::Point2i pointY = list_points2d[2];
......@@ -196,13 +193,11 @@ cv::Mat rot2euler(const cv::Mat & rotationMatrix)
cv::Mat euler(3,1,CV_64F);
double m00 = rotationMatrix.at<double>(0,0);
double m01 = rotationMatrix.at<double>(0,1);
double m02 = rotationMatrix.at<double>(0,2);
double m10 = rotationMatrix.at<double>(1,0);
double m11 = rotationMatrix.at<double>(1,1);
double m12 = rotationMatrix.at<double>(1,2);
double m20 = rotationMatrix.at<double>(2,0);
double m21 = rotationMatrix.at<double>(2,1);
double m22 = rotationMatrix.at<double>(2,2);
double x, y, z;
......
......@@ -17,16 +17,14 @@
* 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 = tutorial_path + "Data/resized_IMG_3875.JPG"; // f 55
std::string img_path = "../Data/resized_IMG_3875.JPG"; // f 55
// COOKIES BOX MESH
std::string ply_read_path = tutorial_path + "Data/box.ply";
std::string ply_read_path = "../Data/box.ply";
// YAML writting path
std::string write_path = tutorial_path + "Data/cookies_ORB.yml";
std::string write_path = "../Data/cookies_ORB.yml";
void help()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment