Error when compiling Example 2-1 on Learning OpenCV
来源:互联网 发布:中兴n760软件下载 编辑:程序博客网 时间:2024/06/14 11:53
Re: Error when compiling Example 2-1 on Learning OpenCV
Hi Travis
You have to supply 2 input arguments to the function
cvLoadImage. In addition to the name of file to be loaded, you have to specify
whether your image is color or gray.
So try to add
CV_LOAD_IMAGE_COLOR (or CV_LOAD_IMAGE_GRAYSCALE, or CV_LOAD_IMAGE_UNCHANGED)
as a second argument.
Leonid
--- In
>
> # gcc `pkg-config --cflags opencv --libs opencv` -o hello hello.c
>
> hello.c: In function `main':
> hello.c:5: error: too few arguments to function `cvLoadImage'
>
> I followed this to set-up pkg-config
>
> <http://opencv.willowgarage.com/wiki/CompileOpenCVUsingLinux >
>
> my output is a little different than it suggested though:
>
> # pkg-config --cflags opencv
> -I/usr/include/opencv
>
> # pkg-config --libs opencv
> -lcxcore -lcv -lhighgui -lcvaux -lml
>
> I'm not sure what the issue is.
>
>
>
>
> [Non-text portions of this message have been removed]
http://tech.groups.yahoo.com/group/OpenCV/message/68835
- Error when compiling Example 2-1 on Learning OpenCV
- ARC error when compiling
- cmake error when compiling ros_rt_wmp
- /usr/bin/ld: error when run ./build.sh after compiling opencv2.4.10 on ubuntu12.04
- Compiling and linking error when using NDK r10 to build cocos2d-x v3.2
- Compiling and linking error when using NDK r10 to build cocos2d-x v3.2
- Compiling and linking error when using NDK r10 to build cocos2d-x v3.2
- eXtremeDB compiling error based on vxworks ppcgnu
- MS C++ 2005 express database mismatch error when compiling
- on error语句,when语句
- fatal error: 'QTKit/QTKit.h' file not found when I build OpenCV on mac
- JVMJ9VM011W error when installing ITM on Linux
- FreeBSD error when installation on ports
- Error when using imshow on OS X
- Internal error (40101) when pre-compiling a program based pro*c
- Undefined symbols for architecture i386 error when compiling siphon for iphone simulator
- Errors when compiling cross gcc
- Compiling Erlang on Ubuntu
- Setting up CEDET
- 程序的编译过程
- 流 学习札记
- Hibernate的八大类HQL查询集合
- 巧妙控制Delphi 的窗体
- Error when compiling Example 2-1 on Learning OpenCV
- 关于通过csDrawGraph生成的图片中汉字乱码问题
- 自编的笔试题
- 周鸿祎:为什么中国出不了乔布斯
- html属性节点的specified说明
- JS 控制按钮可用与不可用
- hadoop状态分析系统chukwa
- 使用 Axis2主要API开发WebService客户端
- <寒江独钓>Windows内核安全编程__Ramdisk源码解读