int sod_img_fill_from_cv_stream(CvCapture *cap, sod_img *pImg);
Capture a frame from an OpenCV CvCapture device. The library must be compiled against OpenCV with the compile-time directive SOD_ENABLE_OPENCV defined. On success, a memory representation of the target image is copied into an instance of the sod_img object which can be processed or analyzed via the exported interfaces.
Valid pointer to an OpenCV CvCapture device.
Target frame is copied into an instance of the sod_img object on success. If the memory allocated to this image is big enough to hold the new frame, a simple copy is performed. Otherwise a memory reallocation operation is performed. The image must be already initialized via sod_make_empty_image() or sod_make_image(). Once done, you must release the memory allocated to this object via sod_free_image() to avoid memory leaks.
SOD_OK is returned on success. Any other error code indicates failure.