1
votes

I have camera from aptina image sensor , I want to access this camera using opencv , I wrote a simple python code to display the video, it works with default camera . I disabled default camera and try to run for the camera but getting the error,

Error File "C:\Python32Bit\video.py, lime 89, in cv2.imshow('images',frame) eror :........\opencv\modules\hihggui\src\window.cpp:error:(-215) size.width>0 && size.height>0 in function cv::imshow

I changed value in cv2.VideoCapture(0) to 1, 2, 3 but same error and also I tried all the optional list in option as cv2.VideoCapture(0+cv2.CAP_DSHOW) but no use

I noticed there is only one camera under "Imaging Devices " which is my default camera, my third party camera is coming under "Universal Serial Bus Controller " as "aptina Demo" , so is there any thing to do with this

1

1 Answers

0
votes

Aptina Image sensor basically gives raw image formats as outputs. If this is a HDR mode you are running, the imageType will be BAYER-14(14 being 14 bits per clock) and if it is a linear mode, imageType will be BAYER-12. This format should be converted to RGB, after grabbing the frame using cv2.VideoCapture. And also Aptina sensors will require some extra sensor data and config files. Providing all of these, openCV should be able to show the frames from Aptina imagers.