原创 Windows下源文件編譯安裝OpenCV2.3

Windows下源文件編譯安裝OpenCV2.3: 1.下載安裝CMake,下載地址:http://www.cmake.org/cmake/resources/software.html 2.下載安裝TortoiseSVN,下載地址:ht

原创 引用 與 指針

引用是C++中的概念,初學者容易把引用和指針混淆一起。  一下程序中,n是m的一個引用(reference),m是被引用物(referent)。  int m;  int &n = m;  n相當於m的別名(綽號),對n的任何操作就是對m

原创 OpenCV自帶例子(一)Load and Display an Image

#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace cv; using n

原创 template metaprogramming

Here is an example of metaprogramming in C++: template <int N> struct Factorial { enum { value = N * Factorial<N

原创 OpenCV自帶例子(三)兩幅圖像相加

#include <cv.h> #include <highgui.h> #include <iostream> using namespace cv; int main( int argc, char** argv ) { doubl

原创 KMP

KMP字符串模式匹配通俗點說就是一種在一個字符串中定位另一個串的高效算法。簡單匹配算法的時間複雜度爲O(m*n);KMP匹配算法。可以證明它的時間複雜度爲O(m+n).。 一.  簡單匹配算法 先來看一個簡單匹配算法的函數: int In

原创 遲綁定早綁定

1、        概念首先,什麼是綁定?( what`s the definition of binding? ) c++編程思想上有說到:Connecting a function call to a function body is

原创 MATLAB圖像處理工具箱

MATLAB圖像處理工具箱 下列表格中除了個別函數外,其餘函數都是圖像處理工具箱提供的關於圖像處理的函數,現摘錄到此以備查找。 表1 圖像顯示 函數名 功能說明 函數名 功能說明 color

原创 將一張圖片的三個RGB分量分別取出來

上圖: Mat process(Mat &img); int main() { VideoCapture cap("video/Megamind.avi"); if (!cap.isOpened()) { cout <<

原创 OpenCV自帶例子(八)圖像腐蝕與膨脹

腐蝕就是使用算法,將圖像的邊緣腐蝕掉。作用就是將目標的邊緣的“毛刺”踢除掉。膨脹就是使用算法,將圖像的邊緣擴大些。作用就是將目標的邊緣或者是內部的坑填掉。 #include <opencv2/highg

原创 OpenCV自帶例子(二)Load, Modify, and Save an Image

Load, Modify, and Save an Image Goals: In this tutorial you will learn how to: Load an image using imread Transform an

原创 OpenCV自帶例子 (十) 圖像幾何變換

int main( int argc, char** argv ) { // Load an image Mat src = imread("D:\\image\\aa.jpg"); Mat dst; dst.create( s

原创 OpenCV基本數據類型

Point_ typedef Point_<int> Point2i; typedef Point2i Point; typedef Point_<float> Point2f; typedef Point_<double> Point

原创 OpenCV自帶例子(七)圖像平滑處理

#include "stdafx.h" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/i

原创 MFC:CImage顯示OpenCV:Mat矩陣圖像

轉自: http://www.opencv.org.cn/forum/viewtopic.php?p=52713 /*************************************/ //1.讀入Mat矩陣(cvMat一樣