Last active
September 26, 2015 16:13
-
-
Save kauevestena/70b92b75723942b3ed4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::vector<cv::Point2f> objectPoints_(int h_,int v_,double lenght) | |
{ | |
//function to return a list of object points, giving the parameters of a checkerboard | |
std::vector<cv::Point2f> object_points; | |
cv::Point2f temp; | |
for (int i=0;i<v_;i++) | |
{ | |
for (int j=0;j<h_;j++) | |
{ | |
temp.x = j*lenght; | |
temp.y = -i*lenght; | |
object_points.push_back(temp); | |
} | |
} | |
return object_points; | |
} | |
std::vector<cv::Point2f> objectPoints2(int h_,int v_,double lenght,double tx_, double ty_) | |
{ | |
//function to return a list of object points, giving the parameters of a checkerboard and a translation, for any purposes | |
std::vector<cv::Point2f> object_points; | |
cv::Point2f temp; | |
for (int i=0;i<v_;i++) | |
{ | |
for (int j=0;j<h_;j++) | |
{ | |
temp.x = j*lenght + tx_; | |
temp.y = -i*lenght + ty_; | |
object_points.push_back(temp); | |
} | |
} | |
return object_points; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment