摘要: 代码其实可以很简洁 1 #include <cv.h> 2 #include <highgui.h> 3 4 using namespace cv; 5 6 int main(){ 7 // Read input image 8 cv::Mat image= cv::imread("C:/testdir/barcode5.jpg", 0); //0表示按黑白图读入 9 if(!image.data) return 0;10 Mat contours;11 Canny(image, contours, 125, 350);12 imshow(... 阅读全文
posted @ 2013-05-01 21:56 ChrisZZ 阅读(963) 评论(0) 推荐(0) 编辑
摘要: 第五章 用生态学过滤方法改变图像这一章我们讨论:用形态过滤器磨损和扩大图像用形态过滤器打开和关闭图像用形态过滤器做边缘检测和角点检测用水印分割图像用抓取切割算法提取前景中物体到google上找到了书对应的代码下载了,然后条码的边缘检测有了点想法。 1 /*------------------------------------------------------------------------------------------*\ 2 This file contains material supporting chapter 5 of the cookbook: 3 ... 阅读全文
posted @ 2013-05-01 15:41 ChrisZZ 阅读(462) 评论(2) 推荐(0) 编辑