建立工程
修改工程屬性
寫**就乙個main函式,直接貼**~
#define
pointer_64
__ptr64
// **oid pvoid64 errors
#include
#include
#include
"videoinput.h"
#include
"opencv2/opencv.hpp"
#pragma
comment(linker, "/nodefaultlib:atlthunk.lib")
using
namespace
cv;using
namespace
std;
intmain()
// getdevicename
//cout << "getdevicename" << endl;
//for (int i = 0; i < numdevices; i++)
//// set frame rate (default is 30)
vi.setidealframerate(0, 25);
// start camera with resolution 1280 by 720
vi.setupdevice(0, 1280, 720);
intwidth = vi.getwidth(0);
intheight = vi.getheight(0);
intsize =vi.getsize(0); // formate is bgr, size = width * height * 3
cout
<< "***********************************="
<< endl;
cout
<< "width : "
<< width
<< " height : "
<< height
<< endl;
cout
<< "size : "
<< size
<< endl;
namedwindow("normal");
uint8_t* pimg = new
uint8_t[size];
while(1)}}
至此,videoinput庫的helloworld程式寫完。
一些問題:
如何設定獲取的格式? 我想採yuv420p的
videoinput的庫是vs2008建立的,用vs2010編譯時鏈結有警告,不知道以後會不會遇到問題。
學習使用PHP CodeSniffer(一)
認識php codesniffer php codesniffer是pear中的乙個用php5寫的用來檢查嗅探php 是否有違反一組預先設定好的編碼標準的乙個包,它是確保你的 簡潔一致的必不可少的開發工具,甚至還可以幫助程式設計師減少一些語義錯誤。安裝php codesniffer 如果你的web伺...
學習使用git (一)
上面一篇文章我們在ubuntu下面安裝和配置了git,那麼應該首先了解下基本的一些概念。git是什麼 git是乙個分布式版本控制 軟體配置管理軟體。與常用的版本控制工具cvs subersion,它採用了分布式版本庫的方式。git的速度很快,對一些大專案來說是非常重要的。而且適用簡單,簡單到只需要使...
Picasso使用學習(一)
在以前的學習中用過的載入框架有universal image loader,fresco,現在學習的專案中使用到了picasso,所以決定學習picasso的使用,簡單了解其內部工作原理。picasso是square公司推出的乙個開源的android圖形快取庫,他實現了的非同步載入,並解決了andr...