Skip to content

Commit

Permalink
2015年11月第四次修订
Browse files Browse the repository at this point in the history
2015年11月第四次修订。
1.修正程序6视频播放完成后内存溢出的问题。
2.修正程序34中函数调用错误的问题。
3.修正程序84中参数顺序错误的问题。
4.添加了关于OpenCV3第十一章的部分说明。
  • Loading branch information
QianMo committed Nov 5, 2015
1 parent 2d85fbd commit 8317207
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// 开发测试所用OpenCV版本: 2.4.9
// 2014年03月 Created by @浅墨_毛星云
// 2014年11月 Revised by @浅墨_毛星云
// 2015年11月 Second Revised by @浅墨_毛星云
//------------------------------------------------------------------------------------------------


Expand All @@ -29,6 +30,13 @@ int main( )
{
Mat frame;//定义一个Mat变量,用于存储每一帧的图像
capture>>frame; //读取当前帧

//若视频播放完成,退出循环
if (frame.empty())
{
break;
}

imshow("读取视频",frame); //显示当前帧
waitKey(30); //延时30ms
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ int main( )
//创建窗口
namedWindow("【<1>方框滤波】", 1);
//创建轨迹条
createTrackbar("内核值:", "【<1>方框滤波】",&g_nBoxFilterValue, 40,on_BoxFilter );
on_MeanBlur(g_nBoxFilterValue,0);
imshow("【<1>方框滤波】", g_dstImage1);
createTrackbar("内核值:", "【<1>方框滤波】", &g_nBoxFilterValue, 40, on_BoxFilter);
on_BoxFilter(g_nBoxFilterValue, 0);
//================================================

//=================【<2>均值滤波】==================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ void on_Matching( int, void* )
g_srcImage.copyTo( srcImage );

//【2】初始化用于结果输出的矩阵
int resultImage_cols = g_srcImage.cols - g_templateImage.cols + 1;
int resultImage_rows = g_srcImage.rows - g_templateImage.rows + 1;
g_resultImage.create( resultImage_cols, resultImage_rows, CV_32FC1 );
int resultImage_cols = g_srcImage.cols - g_templateImage.cols + 1;
g_resultImage.create(resultImage_rows, resultImage_cols, CV_32FC1);

//【3】进行匹配和标准化
matchTemplate( g_srcImage, g_templateImage, g_resultImage, g_nMatchMethod );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// 开发测试所用OpenCV版本: 3.0 beta
// 2014年11月 Created by @浅墨_毛星云
// 2014年11月 Revised by @浅墨_毛星云
// 2015年11月 Second Revised by @浅墨_毛星云
//------------------------------------------------------------------------------------------------


Expand All @@ -29,6 +30,13 @@ int main( )
{
Mat frame;//定义一个Mat变量,用于存储每一帧的图像
capture>>frame; //读取当前帧

//若视频播放完成,退出循环
if (frame.empty())
{
break;
}

imshow("读取视频",frame); //显示当前帧
waitKey(30); //延时30ms
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ int main( )
//创建窗口
namedWindow("【<1>方框滤波】", 1);
//创建轨迹条
createTrackbar("内核值:", "【<1>方框滤波】",&g_nBoxFilterValue, 40,on_BoxFilter );
on_MeanBlur(g_nBoxFilterValue,0);
imshow("【<1>方框滤波】", g_dstImage1);
createTrackbar("内核值:", "【<1>方框滤波】", &g_nBoxFilterValue, 40, on_BoxFilter);
on_BoxFilter(g_nBoxFilterValue, 0);
//================================================

//=================【<2>均值滤波】==================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ void on_Matching( int, void* )
g_srcImage.copyTo( srcImage );

//【2】初始化用于结果输出的矩阵
int resultImage_cols = g_srcImage.cols - g_templateImage.cols + 1;
int resultImage_rows = g_srcImage.rows - g_templateImage.rows + 1;
g_resultImage.create( resultImage_cols, resultImage_rows, CV_32FC1 );
int resultImage_cols = g_srcImage.cols - g_templateImage.cols + 1;
g_resultImage.create(resultImage_rows,resultImage_cols, CV_32FC1);

//【3】进行匹配和标准化
matchTemplate( g_srcImage, g_templateImage, g_resultImage, g_nMatchMethod );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

��ע1��
����OpenCV3�ܹ��ĸ��ģ���ΪOpenCV3��ʽ�����Ѿ���feature2D�Ƴ����ŵ��˵�������xfeature2D���С������Ҫ��ʹ���ⷽ��Ŀ⣬�����Ƽ�ʹ��OpenCV2�����Ա���OpenCV3��ij��������1-10�£���11�º͸���ʾ��������ο�OpenCV2���ʾ������Դ���롣

��ע2��
OpenCV3�е�������xfeature2D�����ص�ַ���£�
https://github.com/Itseez/opencv_contrib/tree/master/modules/xfeatures2d

��ע3��
����Ŀǰ���緶Χ����xfeatures2D���˲��࣬�����ϵ����ϸ����ٵÿ���������ɹ����ã����������µ����⣬Ҳ���ѵõ����������Ǽ��ʹ��xfeatures2d������OpenCV�ٷ���Github����߻���һ�����õĽ̳̣��ɹ��ο���
http://nishantnath.com/2015/10/19/open-cv-3-x-adding-contrib-support-to-default-installation/


�������ߣ���2015��11�¡�
Binary file added OpenCV3-examples/~$配套程序说明.doc
Binary file not shown.

1 comment on commit 8317207

@Bluedream-eric
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good!thanks

Please sign in to comment.