Hi hoehermann,hoehermann wrote:GCC should find the header files itself. When you install a package, the header files are automatically put in the appropriate folders. On Debian it is /usr/include/. Therefore you should include <cv.h> rather than "cv.h", but it should work anyway. Sometimes a packager thinks it is useful to have the headers in a subdirectory. You can examine the examples C source file or the Makefile (compiler option -I) to find out the directory. I give you the advice never to compile something from source and install it yourself unless you really really have to. OpenCV is in the repository and installable via apt-get. Keep in mind that there often are two packages, for example opencv and opencv-dev. For development, you need both, as the latter includes the header files.
Hi hoehermannhoehermann wrote:The filename search for "cv.h" at http://packages.debian.org/ told me that the package name is actually libcv-dev. My bad. The header file's location then is /usr/include/opencv/cv.h, so you might have to write #include <opencv/cv.h>. For the more recent projects I use python-opencv, so my hints for the C world on linux are not 100% accurate.
Code: Select all
Section "Extensions" Option "Composite" "Enable" Option "RANDR" "Enable" EndSection
I can recommend fswebcam, which does exactly that. It is available as a package with both Arch and Raspbian.kuroOluffy wrote:For my project, I only need to capture one frame from the camera and process the image. I do not require any streaming features.
murali wrote:please let me know where did I go wrong
Code: Select all
open cv2 as cv;
I noticed. Unfortunately, that import is not the only line which is wrong. I'll try to explain more detailed. In Python OpenCV can be used in two different manners. The first is via the cv module. It uses the old style binding between C and Python. Therefore, the resulting python code is very C-ish and programming is often tedious. The second (recommended) manner is via the cv2 module. It uses a more object oriented like approach and is much more pythonic. With this module, you have all the benefits of python, including dynamic typing, slice access, automatic memory management and many others.murali wrote:I am very new to python
I ran into the same problem (see my previous posts in this topic).murali wrote:VIDIOC_QUERYMENU: Invalid Argument
Please refer to post http://www.raspberrypi.org/phpBB3/viewt ... 13#p149313 for detailed instructions on increasing the timeout. Decreasing resolution down to 320x240 should also remove the problem. Unfortunately I do not know how to capture high resolution images without having timeout problems. I am disappointed by my pi in this respect.murali wrote:please let me know how to change the timeout value in uvcvideo.ko file