OpenCV
fengcs2010wd
这个作者很懒,什么都没留下…
展开
-
opencv 笔记 00Begin
Load and Display an Image Mat image; image = imread(argv[1], CV_LOAD_IMAGE_COLOR); // Read the file namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// Create a window for display. imshow( "Disp原创 2013-04-08 22:59:59 · 404 阅读 · 0 评论 -
opencv 笔记15 Imgproc_Mackingboard
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /// 全局变量 Mat src, dst; int top, bottom, left, right; int borderType; Scalar valu原创 2013-04-18 22:04:51 · 406 阅读 · 0 评论 -
opencv 笔记14 Imgproc_Filter2D
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /** @函数main */ int main ( int argc, char** argv ) { /// 声明变量 Mat src, dst;原创 2013-04-15 23:24:28 · 1200 阅读 · 0 评论 -
opencv 笔记16 Imgproc_Sobel
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /** @function main */ int main( int argc, char** argv ) { Mat src, src_gray;原创 2013-04-18 22:28:00 · 820 阅读 · 0 评论 -
opencv 笔记13 Imgproc_Threshold
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /// 全局变量定义及赋值 int threshold_value = 0; int threshold_type = 3;; int const max_v原创 2013-04-15 23:03:53 · 2444 阅读 · 0 评论 -
opencv 笔记11 Imgproc_Morphology2
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /// 全局变量 Mat src, dst; int morph_elem = 0; int morph_size = 0; int morph_operat原创 2013-04-15 22:32:00 · 636 阅读 · 0 评论 -
opencv 笔记12 Imgproc_Pyramid
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include #include using namespace cv; /// 全局变量 Mat src, dst, tmp; char* window_name = "Pyramids Demo"; /**原创 2013-04-15 22:38:07 · 412 阅读 · 0 评论 -
opencv 笔记10 Imgproc_Morphology
膨胀和腐蚀 膨胀就是使用算法,将图像的边缘扩大些。作用就是将目标的边缘或者是内部的坑填掉。 腐蚀就是使用算法,将图像的边缘腐蚀掉。作用就是将目标的边缘的“毛刺”踢除掉。 使用相同次数的腐蚀与膨胀,可以使目标表面更平滑。 若先腐蚀后膨胀的过程:利用它可以消除小物体,在纤细点处分离物体,平滑较大物体边界,但同时并不会明显改变原来物体的面积。而先膨胀后腐蚀的过程:利用它可以填充物体内细小空洞,连原创 2013-04-14 22:50:30 · 535 阅读 · 0 评论 -
opencv 笔记19 Imgproc_HoughLines
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include using namespace cv; using namespace std; void help() { cout "\nThis program demonstrates line finding with原创 2013-04-21 16:37:24 · 844 阅读 · 0 评论 -
opencv 笔记06Core_Paint
OpenCV 原理 本节中,我门将大量使用 Point 和 Scalar 这两个结构: Point 表示了由其图像坐标 和 指定的2D点。可定义为: Point pt; pt.x = 10; pt.y = 8; 或者 Point pt = Point(10, 8); S calar 表示了具有4个元素的原创 2013-04-10 17:20:56 · 446 阅读 · 0 评论 -
opencv 笔记05Core_Change
#include #include #include using namespace std; using namespace cv; double alpha; /** int beta; /** int main( int argc, char** argv ) { /// 读入用户提供的图像 Mat image = imread( argv[1] );原创 2013-04-10 16:50:51 · 408 阅读 · 0 评论 -
opencv 笔记08Core_DFT
#include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include int main(int argc, char ** argv) { const char* filename = argc >=2 ? argv[1原创 2013-04-10 23:35:29 · 840 阅读 · 0 评论 -
opencv 笔记07Core_RND
随机数发生器类 (RNG) 并得到均匀分布的随机数。 RNG::RNG() RNG::RNG(uint64 state) RNG constructors Parameter: state – the 64-bit value used to initialize the RNG These are the RNG con原创 2013-04-10 17:41:34 · 621 阅读 · 0 评论 -
opencv 笔记04Core_Blending
结果: 代码 #include #include #include using namespace cv; int main( int argc, char** argv ) { double alpha = 0.5; double beta; double input; Mat src1, src2, dst; /// Ask the user enter原创 2013-04-09 23:44:54 · 430 阅读 · 0 评论 -
opencv 笔记03Core_Mask
基本方法 void Sharpen(const Mat& myImage,Mat& Result) { CV_Assert(myImage.depth() == CV_8U); // 仅接受uchar图像 Result.create(myImage.size(),myImage.type()); const int nChannels = myImage.chan原创 2013-04-09 23:38:14 · 600 阅读 · 0 评论 -
opencv 笔记02Core_Scan
1. OpenCV提供了两个简便的可用于计时的函数 getTickCount() 和 getTickFrequency() 。第一个函数返回你的CPU自某个事件(如启动电脑)以来走过的时钟周期数,第二个函数返回你的CPU一秒钟所走的时钟周期数。这样,我们就能轻松地以秒为单位对某运算计时: double t = (double)getTickCount(); // 做点什么 ... t = (原创 2013-04-09 23:26:08 · 545 阅读 · 0 评论 -
opencv 笔记01Core_Mat
Mat - 基本图像容器 Mat A, C; // 只创建信息头部分 A = imread(argv[1], CV_LOAD_IMAGE_COLOR); // 这里为矩阵开辟内存 Mat B(A); // 使用拷贝构造函数 C = A; 以上代码中的所有Mat对象最终都原创 2013-04-08 23:33:55 · 448 阅读 · 0 评论 -
opencv 笔记17 Imgproc_Lapacian
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include #include using namespace cv; /** @函数 main */ int main( int argc, char** argv ) { Mat src, src_gray, dst;原创 2013-04-21 15:03:33 · 694 阅读 · 0 评论