LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   OpenCV programming - highgui.h: no such file or directory (https://www.linuxquestions.org/questions/programming-9/opencv-programming-highgui-h-no-such-file-or-directory-817447/)

logickills 07-01-2010 11:45 AM

OpenCV programming - highgui.h: no such file or directory
 
I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.

I have 64 bit Mint if that helps at all.

Any input would be helpful, thanks.

knudfl 07-01-2010 01:29 PM

OpenCV libraries
http://packages.debian.org/sid/libhighgui-dev

sudo apt-get install libhighgui-dev

It is very easy to find highgui.h :
http://packages.debian.org/search?su...ords=highgui.h
Just enter highgui.h in "Search" → 'package contents'

And the libhighgui-dev file list
http://packages.debian.org/sid/amd64...i-dev/filelist
/usr/include/opencv/highgui.h
..

logickills 07-01-2010 02:06 PM

I installed those packages and I am still getting the same errors. I went ahead and navigated to /usr/include/opencv and I see highgui.h - the problem is g++ isn't seeing it.

knudfl 07-01-2010 03:28 PM

Well, the file(s) can be included like this in your program :

#include <opencv/highgui.h>

Or in a Makefile + probably a couple of other methods.

..

Aquarius_Girl 10-24-2011 06:49 AM

Quote:

Originally Posted by knudfl (Post 4020864)
sudo apt-get install libhighgui-dev

Does this have some other name for Suse? Zypper is clueless about this.
I'd prefer zypper rather than...

http://opencv.willowgarage.com/wiki/...CV_on_Linux.3F
Code:

# zypper install libcv1 libcv-dev libcvaux1 libcvaux-dev libhighgui1 libhighgui-dev
Loading repository data...
Reading installed packages...
'libcv-dev' not found in package names. Trying capabilities.
No provider of 'libcv-dev' found.
'libcv1' not found in package names. Trying capabilities.
No provider of 'libcv1' found.
'libcvaux-dev' not found in package names. Trying capabilities.
No provider of 'libcvaux-dev' found.
'libcvaux1' not found in package names. Trying capabilities.
No provider of 'libcvaux1' found.
'libhighgui-dev' not found in package names. Trying capabilities.
No provider of 'libhighgui-dev' found.
'libhighgui1' not found in package names. Trying capabilities.
No provider of 'libhighgui1' found.
Resolving package dependencies...
Nothing to do.

I have opencv installed. opencv-2.1.0-2.37.x86_64
Code:

linux-dopx:~ # opencv_
opencv_createsamples  opencv_haartraining  opencv_performance    opencv_traincascade 

linux-dopx:~ #

The thread is old, I know, but I also received the exact same error, and I think
it is better to keep all the information in one place.

knudfl 10-24-2011 07:12 AM

#5, Anisha

Quote:

Does this have some other name for Suse?
Yes : Is included in the package 'opencv-devel'
Will provide /usr/lib(64)/libhighgui.so, /usr/include/opencv/highgui.h, etc.
( ? No highgui.hpp, libhighgui.a in the Suse package ? )


Example finding e.g. highgui.h for Suse : http://rpm.pbone.net/
>> Search > Advanced Search : highgui.h, and tick "OpenSuSE".


Regards
.

hxr99 12-28-2011 09:56 AM

I use Linux Mint,too.
If you are going to compile any opencv project in C/C++, you should give the `pkg-config --libs --cflags opencv` arguments.
It should be like this: g++ `pkg-config --libs --cflags opencv` myProject.cpp -o myProject

If you don't mind, better go with an IDE like code::block or Qt, I've posted a tutorial how to connect the OpenCV library with the code::block.
This is the link for the code::block : http://hxr99.blogspot.com/2011/12/ho...-block-in.html
This is the link for the Qt : http://hxr99.blogspot.com/2011/12/op...ing-image.html
There are a few examples too.

Hope it will be useful for all LQers.


All times are GMT -5. The time now is 03:22 PM.