Capture real time video from a digital camera for OpenCV
Posted: Tue Dec 08, 2015 9:11 am
Dear All:
In order to perform a real-time object detection, I connected a Canon digital camera via usb to a Raspberry Pi 2 platform. Then I installed Gphoto2. Now, I got two separate files which are built and perfectly work via two separate builders. However, I cannot combine them for the above purpose; and I want you, experts, to resolve this problem for me, as follows:
1- First one is a C program based file that captures several images and send to the Raspberry Pi. This file is built on Terminal by:
gcc –o filename filename.c –lgphoto2
(Reference: http://sepharads.blogspot.com.tr/2011/1 ... using.html )
2- The second one is a c++ program based file that captures video from a webcam for video analysis by OpenCV. This file is built by CMakeLists.txt.
(References:
http://docs.opencv.org/2.4/doc/tutorial ... stall.html
http://docs.opencv.org/2.4/doc/tutorial ... cmake.html )
I need to have a single file capable of both abovementioned jobs, except I need video (GP_CAPTURE_MOVIE) rather a sequence of images. The operating system is Debian Jessie.
(References: http://www.gphoto.org/doc/api/gphoto2-c ... 6929e6cee7 ).
Thank you in advance.
Cheeeers.
In order to perform a real-time object detection, I connected a Canon digital camera via usb to a Raspberry Pi 2 platform. Then I installed Gphoto2. Now, I got two separate files which are built and perfectly work via two separate builders. However, I cannot combine them for the above purpose; and I want you, experts, to resolve this problem for me, as follows:
1- First one is a C program based file that captures several images and send to the Raspberry Pi. This file is built on Terminal by:
gcc –o filename filename.c –lgphoto2
(Reference: http://sepharads.blogspot.com.tr/2011/1 ... using.html )
2- The second one is a c++ program based file that captures video from a webcam for video analysis by OpenCV. This file is built by CMakeLists.txt.
(References:
http://docs.opencv.org/2.4/doc/tutorial ... stall.html
http://docs.opencv.org/2.4/doc/tutorial ... cmake.html )
I need to have a single file capable of both abovementioned jobs, except I need video (GP_CAPTURE_MOVIE) rather a sequence of images. The operating system is Debian Jessie.
(References: http://www.gphoto.org/doc/api/gphoto2-c ... 6929e6cee7 ).
Thank you in advance.
Cheeeers.