多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > php開源 > 綜合技術 > Mac下Opencv(2.4.9)配置Xcode(4.6.1)

Mac下Opencv(2.4.9)配置Xcode(4.6.1)

來源:程序員人生   發布時間:2014-12-17 08:43:54 閱讀次數:3940次
1:安裝homebrew和cmake
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake
2:安裝opencv
brew tap homebrew/science
brew install opencv

3.使用Xcode進行OpenCV項目開發

1.Open Xcode, choose New -> New Project -> Command Line Tool

2.Name it and select C++ for type

3.Click on your project from the left menu. Click the build settings tab from the top.
Filter all. Scroll to Search Paths. Under header search paths, for debug and release,
set the path to /usr/local/include. Under library search paths, set the path
to $(PROJECT_DIR). Finally, check if C++ standard library is libc++(Xcode默許的就是這個
) or not,if not, change it to this!
ps:部份xcode和opencv的版本需要用libstdc++,請自行測試哪一個合適自己。
4.Click on your project from the left menu. File->New->New Group,
Name the group OpenCV Frameworks
5.Select the folder (group) you just labeled, OpenCV Frameworks
in the left menu. Go to File -> add Files, Type shift + command +G, which
will allow you to manually go to a folder. Go to -> /usr/local/lib
6.Select both of these files, libopencv_core.dyliblibopencv_highgui.dylib,
and click Add. (you may need to add other library files from this folder to run other code.)
7.You must include this line of code in the beginning of your main.cpp file:
#include <opencv2/opencv.hpp>
可以修改main.cpp,代碼以下,運行結果就是顯示1張指定的圖片
#include <opencv2/opencv.hpp>
using namespace cv;
int main(int argc, char** argv) {
     Mat image;
     image = imread("/Users/hujiawei/Pictures/others/other_naicha/naicha.jpg", 1);
     namedWindow("Display Image", WINDOW_AUTOSIZE);
     imshow("Display Image", image);
     waitKey(0);
return 0;
}








生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 精品一区二区乱码久久乱码 | 亚洲色播永久网址大全 | 久久久久欧美精品 | 亚洲精品毛片久久久久久久 | 一级毛片aa | 自拍自偷 | 性欧美videofree丝袜 | 香蕉成人啪国产精品视频综合网 | 一级欧美 | 美女h视频 | 找国产毛片看 | 久久久久国产精品免费免费 | 日韩欧美国产中文字幕 | 伊人.com| 一级做a级爰片性色毛片视频 | 12306播播影视播播影院午夜 | 图片区偷拍区小说区 | 久久精品区 | 一区二区精品在线观看 | 亚洲天天看 | 老司机午夜精品视频 | 日本孕妇大胆孕交无码 | www久久久久 | 中文字幕资源在线 | 综合亚洲欧美 | 成年人视频在线观看免费 | 国产乱码一区二区三区四区 | 日韩久久久精品首页 | 欧美日韩一区二区三区视视频 | 欧美猛烈性xbxbxbxb | 欧美最猛性xxxxx亚洲精品 | 高清国产一区二区三区 | 精品久久久日韩精品成人 | 日本三级成人中文字幕乱码 | 邪恶亚洲 | 亚洲高清一区二区三区四区 | 五月天最新网站 | 天堂亚洲国产日韩在线看 | 午夜视频在线观看视频 | q欧美性猛交xxxx乱大交 | 国产video|