Ask Your Question

Michael Brown's profile - activity

2015-12-23 06:08:36 -0600 asked a question Digital Camera Driver for OpenCV-Python

Dear Folks; Do know if there is a digital camera driver to be used for OpenCV-Python video capture (cv2.VideoCapture)?

OS: Debian Jessie Canon PowerShot SX100

2015-12-13 10:38:35 -0600 received badge  Enthusiast
2015-12-10 06:30:38 -0600 asked a question CMakeList for Gphoto2 and OpenCV

For building the attached cpp file I receive CMAKE_MODULE_PATH error while running make command on Terminal.

It uses Gphoto2 and OpenCV to capture live images from a digital camera. This files is based on http://docs.opencv.org/master/db/d56/...

I believe the problem is caused by a wrong CMakeLists.txt file, however I do not know how to fix it. Thanks for your guidance in advance.

grayp.cpp file:

#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/structured_light.hpp>
#include <iostream>
#include <stdio.h>
using namespace cv;
using namespace std;
int main( )
{

// Open camera,  using libgphoto2
VideoCapture cap1( CAP_GPHOTO2 );

if( !cap1.isOpened() )
{
// check if cam1 opened
cout << "cam1 not opened!" << endl;}
else
cout <<"FFFFFFFFFFFFFFFF"<< endl;

 // the camera will be deinitialized automatically in VideoCapture destructor
cout << "Closing program" << endl;
return 0;
}

CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8)
project( grayp )
find_package( OpenCV REQUIRED )
add_executable( grayp grayp.cpp )
target_link_libraries( grayp ${OpenCV_LIBS} )
option(GPHOTO2 "test" ON)
find_package( GPHOTO2 REQUIRED )
include_directories(/usr/local/include/gphoto2)
include_directories(/home/pi/Downloads/libgphoto2-2.5.9/libgphoto2)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/home/pi/code/prof/gray")
2015-12-08 03:16:21 -0600 asked a question Combining OpenCV with Gphoto2 codes

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... ) 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/tutori... http://docs.opencv.org/2.4/doc/tutori... ) 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... ). Thank you in advance. Cheeeers.