ArduCAM / ArduCAM_USB_Camera_Shield

This is the repository for ArduCAM USB Camera Shield
125 stars 71 forks source link

How do I capture images from two camera modules at the same time? #46

Open youn-seong-rim opened 6 years ago

youn-seong-rim commented 6 years ago

I applied the UsbTest source to capture and display images from one MT9V034 camera module. But I tried coding and testing to get images from two modules at the same time, but I could not get proper images. I have created two capture threads and two reading threads, and I have coded to obtain and display images independently of these two threads. The problem here is that if you run two capture threads at the same time, the value of USB_CAMERA_FRAME_INDEX_ERROR is often returned from the ArduCam_captureImage function, and the capture frame rate is not full frame and the frame rate is significantly lower than when using only one module. Also, the data obtained from the ArduCam_readImage (m_cUsbCameraHd [uiCam], m_ArduCamOutData [uiCam]) function of each read thread was read only the image data of the specific module. I have made a lot of effort but I do not know why this is happening.

Can not we get images from two camera modules by applying functions provided by usbtest program? If possible, I would like to know how to capture from two camera modules simultaneously using the above functions in the window program. I would appreciate your advice

ArduCAM commented 6 years ago

Have you tried to launch two USBTest and run it at the same time? You have to click scan to select different camera index when open the camera.