How to get raw data by OpenCV?
Hi all,
I want to get raw12 data form my camera.
My OpenCV APIs version is 2.4.13.6, and the IDE is Visual studio 2010.
I had found similar issue int the forum.
I had used "camera1.set(CV_CAP_PROP_CONVERT_RGB,0) " to disable convert to RGB,
but it always return false. Is there another way to get raw image?
Otherwise, I couldn't find the videoio.hpp in this SDK,
is it not support output another format in this version?
int main(int argc, char **argv) {
VideoCapture camera1;
Mat frame1;
camera1 = VideoCapture(CV_CAP_DSHOW);
camera1.open(0);
camera1.set(CV_CAP_PROP_FRAME_WIDTH,1920);
camera1.set(CV_CAP_PROP_FRAME_HEIGHT,1081);
bool ok = camera1.set(CV_CAP_PROP_CONVERT_RGB,0);
//VideoWriter video1;
cout << camera1.get(CV_CAP_PROP_FRAME_WIDTH) << endl;
cout << camera1.get(CV_CAP_PROP_FRAME_HEIGHT) << endl;
Size s1 = Size((int)camera1.get(CV_CAP_PROP_FRAME_WIDTH),(int)camera1.get(CV_CAP_PROP_FRAME_HEIGHT));
while(!camera1.isOpened()){
cout << "Camera not opened" << endl;
continue;
}
while(1){
camera1.read(frame1);
imshow("Display1",frame1);
cout << frame1.data << endl;
if(waitKey(1) == 27){
break;
}
}
camera1.release();
return 0;
}
DEAD. NO MORE MAINTAINED. DONT TRY WITH THAT
indeed, API was organized differently, it's all in highgui
Hi Sir, is there new version can support VS2010?
probably not. you're living in the past ;(