Hi, I have a Sumix usb3 camera, and am attempting to stream into cv::Mat.
The data comes in as a byte[]:
#define FRAMEINFO_SIZEF 4096
#define MAX_FRAME_SIZE (MAX_FRAME_SIZEX*MAX_FRAME_SIZEY)
#define MAX_FRAME_SIZE_RAW (2*MAX_FRAME_SIZE+FRAMEINFO_SIZEF)
BYTE framemaster[MAX_FRAME_SIZE_RAW + FRAMEINFO_SIZEF];
And I run:
int W = 640;
int H = 480;
if (smx16eXX_GetFrameEx8(H_master, framemaster, MAX_FRAME_SIZE_RAW + FRAMEINFO_SIZEF))
{
std::cout << "got cameras" << std::endl;
cv::Mat newImg = cv::Mat(H, W, CV_8UC4, framemaster);
cv::imshow("yes", newImg);
}
The image that I get is squashed horizontally, and doubled. Please see:
http://pasteboard.co/1qM0BFvA.jpg
I have tried other formats in place of CV_8UC4, but see other, worse issues. What am I missing ?
Thanks!