Thread: Combine two separate files for the purpose of real-time detection from a digit camera

  1. #1
    Registered User
    Join Date
    Dec 2015
    Posts
    2

    Combine two separate files for the purpose of real-time detection from a digit camera

    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: Sepharad's: Camera tethered capturing using libgphoto2 )
    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:
    Installation in Linux — OpenCV 2.4.12.0 documentation
    Using OpenCV with gcc and CMake — OpenCV 2.4.12.0 documentation )
    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: libgphoto2 photo camera library (libgphoto2) API: gphoto2/gphoto2-camera.h File Reference ).
    Thank you in advance.
    Cheeeers.

  2. #2
    Registered User
    Join Date
    Oct 2015
    Posts
    28
    Unless you have some moneys, we're going to have to agree that the expert is within you, waiting to be nurtured.:-)

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > 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
    1. Edit filename.c and change main() into say doCapture()

    2. Edit the main() in OpenCV program to start with a call to doCapture()

    3. Then add filename.c to source list in CMakeLists.txt

    4. Add –lgphoto2 to the library list in CMakeLists.txt
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Also posted here, awaiting answers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 07-10-2012, 07:54 AM
  2. Replies: 6
    Last Post: 04-17-2010, 11:31 AM
  3. Real-time camera logger
    By coletek in forum C Programming
    Replies: 0
    Last Post: 04-30-2009, 01:26 AM
  4. Combine 3 files in C
    By Leyla_ in forum C Programming
    Replies: 2
    Last Post: 03-21-2009, 03:38 AM
  5. inputting time in separate compilation
    By sameintheend01 in forum C++ Programming
    Replies: 6
    Last Post: 03-13-2003, 04:33 AM

Tags for this Thread