I try to convert a boost::array rightCamInfo.K to an opencv Mat cv::Mat K. I didn't found any functions for this setting so I wrote an iterative approach:
float tempK[9];
cv::Mat K;
for (int i = 0; i < 9; i++) {
tempK[i] = rightCamInfo.K[i];
}
K = cv::Mat(3, 3, CV_64F, &tempK);
But this is giving me strange results. The range of the given data is between 400 and 0 and the result matrix is around 5 * 10^(-315). So obviously there are some conversion errors. What is wrong? Did I chose the wrong type for the matrix or does this array type is not fitting?