公告

非常抱歉,由于我们的服务器提供商硬盘出错,数据丢失,网站重建中...
I am so sorry, because of our server's hard disk error, data lost, the website reconstructioning
QQ:512000523
MSN : funchip@hotmail.com

 
首页 arrow 支持论坛
杭州福芯-支持论坛
欢迎您, 游客
登录注册.    忘记密码?
black austra (1 个人正在浏览) (1) 个游客
到底部 发表回复
被收藏: 0
话题: black austra
#17
fcdpj (管理员)
管理员
帖子: 13
graph
该会员已离线 点此观看该会员的个人资料
OpenCV在Linux下的安装使用
发表于 2007-11-19 11:09
评分: 0  

OpenCV官方给出的Linux下安装实在不方便,要root权限,install后还要执行好 ‡ 步操作,实在是烦人,参考了老外的 ‡ 个例子,
在Linux另一种安装使用方法如下。

1、解压OpenCV。
 下载地址:
 http://www.fcdpj.com/component/option,com_docman/task,doc_details/gid,185/Itemid,34.html
 解压到指定的位置,我解压到了 /home/xxx/opencv

2、配置,编译,安装
  指定OpenCV库安装的位置
 ./configure --prefix=/home/xxx/opencv/sdk
 其他配置选项可以按自己需要增 ˆ
 make
 make install
Â
3、用一个小程序测试
// C++ includes.
代码: :

#include         // OpenCV includes.    #include    #include         int main(int argc, char* argv[])    {       // Make sure the user passed in the right number of arguments.       if (argc != 2)       {          std::cout , JPG, PNG, PBM, PGM, PPM, SR, RAS, TIFF, TIF.       IplImage* image = cvLoadImage(argv[1]);            // Create a window with the given name (displayed at the top of the       // window).  Also, we'll make it automatically resize to whatever content       // it displays.       cvNamedWindow("My Window", CV_WINDOW_AUTOSIZE);            // Make the image show up in the named window.       cvShowImage("My Window", image);            // Pause here until the user presses a key.       cvWaitKey(0);            // Destroy the image and window.       cvReleaseImage(&image);       cvDestroyWindow("My Window");            return 0;    }   


4、使用这里提供的一个非常简单makefile编译
INSTALLLIB = /home/username/opencv/sdk
把Makefile里的INSTALLLIB改成你自己的路径
APP = ftest 改成你自己的文件名
然后
make
make setlib

make 是来编译代码
make setlib是用来设置LD_LIBRARY_PATH,执行一次就可以了。

5、如果一切正常的话,执行./ftest xxx.jpg就可以看到效果了

MD5校验值 : 890043e34cced3f76b728dea0789f05c

文件附件:
文件名: Makefile.rar
文件大小: 606

请注意, 尽管 boardcode 及表情图案按钮没有显示,它们仍然可以通过手动输入生效。
 
向版主举报   已记录 已记录  
 
最后编辑: 2007-11-19 11:19 由: fcdpj.
  Reply Quote
#24
blackaustral (访客)
点此观看该会员的个人资料
出生日期:
black austra
发表于 2008-05-13 10:25
 

from for the I go back for the and we become forts having I confessed visit

请注意, 尽管 boardcode 及表情图案按钮没有显示,它们仍然可以通过手动输入生效。
 
向版主举报   已记录 已记录  
  Reply Quote
到顶部 发表回复

© 2008 杭州福芯电子 浙ICP备05040812号
Joomla!是基于GNU/GPL许可发行的免费软件.