OpenCV图像处理教程 - 贾志刚 课程配套源代码


该压缩包包含 贾志刚 课程 - OpenCV图像处理视频课程中 的配套源代码,有需要的读者可以下载。
资源截图
代码片段和文件信息
#include 
#include 
#include 

using namespace cv;

int main(int argc char** argv) {
Mat src dst;
src = imread(“D:/vcprojects/images/test.png“);
if (!src.data) {
printf(“could not load image...
“);
return -1;
}
namedWindow(“input image“ CV_WINDOW_AUTOSIZE);
imshow(“input image“ src);

/*
int cols = (src.cols-1) * src.channels();
int offsetx = src.channels();
int rows = src.rows;

dst = Mat::zeros(src.size() src.type());
for (int row = 1; row < (rows - 1); row++) {
const uchar* previous = src.ptr(row - 1);
const uchar* current = src.ptr(row);
const uchar* next = src.ptr(row + 1);
uchar* output = dst.ptr(row);
for (int col = offsetx; col < cols; col++) {
output[col] = saturate_cast(5 * current[col] - (current[col- offsetx] + current[col+ offsetx] + previous[col] + next[col]));
}
}
*/
double t = getTickCount();
Mat kernel = (Mat_(3 3) << 0 -1 0 -1 5 -1 0 -1 0);
filter2D(src dst src.depth() kernel);
double timeconsume = (getTickCount() - t) / getTickFrequency();
printf(“tim consume %.2f
“ timeconsume);

namedWindow(“contrast image demo“ CV_WINDOW_AUTOSIZE);
imshow(“contrast image demo“ dst);

waitKey(0);
return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1316  2016-10-20 09:33  课程配套源代码main-002.cpp

     文件        576  2016-09-15 15:53  课程配套源代码main-003.cpp

     文件       1325  2016-10-20 15:53  课程配套源代码main-004.cpp

     文件       1216  2016-10-09 11:53  课程配套源代码main-005.cpp

     文件        946  2016-10-20 17:04  课程配套源代码main-006.cpp

     文件       1447  2016-10-20 17:38  课程配套源代码main-007.cpp

     文件       2413  2016-10-21 11:38  课程配套源代码main-008.cpp

     文件       1011  2016-10-10 13:08  课程配套源代码main-009.cpp

     文件        661  2016-10-21 12:21  课程配套源代码main-010.cpp

     文件        718  2016-10-21 15:04  课程配套源代码main-011.cpp

     文件        932  2016-10-21 15:49  课程配套源代码main-012.cpp

     文件        619  2016-10-21 16:34  课程配套源代码main-013.cpp

     文件       1199  2016-10-21 17:19  课程配套源代码main-014.cpp

     文件       1007  2016-10-24 10:48  课程配套源代码main-015.cpp

     文件        994  2016-10-26 10:38  课程配套源代码main-016.cpp

     文件       1325  2016-10-26 12:18  课程配套源代码main-017.cpp

     文件       1260  2016-10-26 13:56  课程配套源代码main-018.cpp

     文件       1437  2016-10-26 15:43  课程配套源代码main-019.cpp

     文件        806  2016-10-26 16:13  课程配套源代码main-020.cpp

     文件       1077  2016-10-26 17:09  课程配套源代码main-021.cpp

     文件       1621  2016-10-28 10:04  课程配套源代码main-022.cpp

     文件       1035  2016-10-27 12:24  课程配套源代码main-023.cpp

     文件       1756  2016-10-27 14:58  课程配套源代码main-024.cpp

     文件        573  2016-10-27 15:14  课程配套源代码main-025.cpp

     文件       2001  2016-10-27 17:49  课程配套源代码main-026.cpp

     文件       2763  2016-10-28 10:59  课程配套源代码main-027.cpp

     文件       1748  2016-10-28 12:55  课程配套源代码main-028.cpp

     文件       1745  2016-10-28 15:22  课程配套源代码main-029.cpp

     文件       1402  2016-10-28 16:21  课程配套源代码main-030.cpp

     文件       1810  2016-10-28 17:36  课程配套源代码main-031.cpp

............此处省略40个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)