HI,
I have an unsigned char array, where the cam driver gives me the image data:
unsigned char* imgBuf = new unsigned char[imgSize];
ASIGetDataAfterExp(CamNum, imgBuf, imgSize);
ho to save this with opencv ?
I tried
Mat save_img;
imgBuf >> save_img;
if(save_img.empty())
{
std::cerr << “Something is wrong with the webcam, could not get frame.” << std::endl;
}bei m
// Save the frame into a file
imwrite(“test.jpg”, save_img); // A JPG FILE IS BEING SAVED
but it gives me:
main_SDK2_snap.cpp:255:11: error: no match for \u2018operator>>\u2019 (operand types are \u2018unsigned char*\u2019 and \u2018cv::Mat\u2019)
imgBuf >> save_img;
please help !!!