如何在没有e的情况下cout / printf mat

时间:2016-11-06 11:55:38

标签: opencv

我是openCV编程的先驱。最近我遇到了一个问题,打印出与Matlab完全不同的值。已经搜索了很多,但他们都没有解决这个问题。代码就像这样:

double asd1[4]={1.123456789123456789,1.111,1.11111,1.1111};

Mat f = Mat(1,4,CV_32F,asd1);

cout<<"f="<<f<<endl;

for (int y = 0; y < f.rows; ++y) {
    for (int x = 0;x < f.cols; ++x) {
        printf("%.3f ", f.at<double>(y, x));
    }
}

但它没有用。如果我尝试使用cout<<"f="<<f<<endl;进行cout,它将输出奇怪的值。任何的想法?非常感谢您的帮助。

0 个答案:

没有答案
相关问题