I am using libgphoto2 to get images from a still camera, and I am not able to convert the images into cv::Mat data type. The image from the camera is stored as char*, and when I convert the image, the image is solid blue. This is the code I have for the conversion.
cv::Mat tempMat = cv::Mat(3456, 5184, CV_8UC3, (unsigned char) *data);
I am able to write the data to a file and reload in the image in opencv, but I don't want to save and load from file every time I capture an image.