原创 OpenCV 行(高)與列(寬)參數順序問題

OpenCV中行數(rows)和列數(cols)對應高(height)和寬(width),由於OpenCV1.0和OpenCV2.0的代碼風格有所不同,所以在處理行和列這個細節上面需要多加註意,特別是函數參數的順序,到底是先行後列還是先

原创 6.函數對象 適配器的用法

1、for_each用法 #include<iostream> #include<vector> #include<algorithm> using namespace std; //template<class T> class C

原创 找出字符串中首先出現3次的字符

#include <iostream> using namespace std; int main() { char str[100]; cin.get(str, 100); int ch[26] = { 0 }; int i =

原创 matlab學習

12天的努力,我看完了586頁書,學了MATLAB,過得很累,但我心裏很舒坦。我不用再爲別的事情煩心了,因爲我在一門心思的學習,我花了我將近所有的課餘時間。只有這樣,我才能用自己身體上的累來掩蓋我自己心裏面的累。這麼多年了,幾乎每天我

原创 圖像縮放雙立方插值

一直都在看別人用雙三次插值,一直都沒有概念,今天百度了一下,感覺和雙三次樣條原理類似,只不過計算簡單點,自己也比較了兩者的計算時間,雙三次樣條的時間確實要長些。 一:數學原理 如果已知一個函數f(x)以及它在x=0,x=1處

原创 Bumblebee雙目測量基本原理

點擊打開鏈接 點贊 收藏 分享 文章舉報 飛翔在藍天 發佈了60 篇原創文章 · 獲贊 19 · 訪問量 8萬+ 私信 關

原创 C語言字符串操作總結大全

1)字符串操作 strcpy(p, p1) 複製字符串 strncpy(p, p1, n) 複製指定長度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定長度字符串 strlen(p) 取

原创 刪除字符串中空格

#include<iostream> #include<string> using namespace std; string erasespace(string s) { string str = s; int count = 0

原创 OPENCV HS算法源碼

#include "_cv.h" #define CONV( A, B, C) ( (float)( A + (B<<1) + C ) ) typedef struct { float xx; float xy;

原创 OpenCV自帶方法遍歷目錄下文件

Directory定義於contrib.hpp(v2.0以上),定義很簡單就三個函數:class CV_EXPORTS Directory { public: static std::vector<std::strin

原创 Kalman跟蹤

#include "cv.h" #include "highgui.h" #include <math.h> int main(int argc, char** argv) { /* A matrix data */ c

原创 光流法 HS與LK

1、HS算法 #include "cv.h" #include "highgui.h" #include <math.h> #include <stdio.h> #include "opencv2/legacy/legacy.hpp" #

原创 c++類的簡單實例

輸入學生的學號,以及三門課程成績,輸出平均成績,並輸出是否通過(假如任意一門成績小於60則沒通過) 1、 #include <iostream> #include <string> using namespace std; c

原创 背景建模檢測

#include <stdio.h> #include <cv.h> #include <highgui.h> int main( int argc, char** argv ) { //聲明IplImage指針 IplImag

原创 定時自動打開網頁並截圖

由於工作原因,需要定時獲取某個網站的信息,該程序可以提供無人監管的自動截圖 1、主程序 #include <windows.h> #include<iostream> #include "stdafx.h" #include "sc.h