cv::Mat matrix, HOW TO Reduce digits to the right of the decimal point in cv::Mat?
问题 I have an app that prints a 3x3 cv::Mat on the iPhone screen. I need to reduce the decimals, as the screen is not so big, see: [1.004596557012473, -0.003116992336797859, 5.936915104939593; -0.007241746117066327, 0.9973985665720294, -0.2118670500989478; 1.477734234970711e-05, -1.03363734495053e-05, 1.000089074805124] so I would like to reduce the decimals .4 or .6 or six decimals. Any ideas? Cheers 回答1: If you were using printf cv::Mat data(3, 3, CV_64FC1); for (int y = 0; y < data.rows; ++y)