For the following function, N in "n=" line has 3 values when executed
N=[0, 0, 586218.1824].
When I break it down to
C = (N.at<double>(2))the 586218.1824 has been truncated to 586218.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
void find_n_ABC(std::vector<cv::Point3d>&n, std::vector<cv::Point3d> &QP, std::vector<cv::Point3d> &RP, double &A, double &B, double &C)
{
Mat qp(QP);
Mat rp(RP);
Mat N(n);
N = qp.cross(rp);
std::cout << "n=" << N << std::endl;
A = (N.at<double>(0));
B = (N.at<double>(1));
C = (N.at<double>(2));
std::cout << "n = <a,b,c> " << A << "," << B << "," << C << std::endl;
}
| |
Why does it get truncated?
Last edited on
How is Poin3d defined?
How is cross() defined and declared?
How is Mat defined?
How is the Mat operator<< defined and declared?
Last edited on