opencv 学习

来源:互联网 发布:iphone屏幕录制软件 编辑:程序博客网 时间:2024/05/17 00:55

cvtColor 将图形转成灰色

threshold 二值化

canny 轮廓化





Mat image=imread("d:\\bear.jpg");    namedWindow("src");    imshow("src",image);    Mat color;    cvtColor(image,color,CV_BGR2GRAY);    namedWindow("color");    imshow("color",color);    Mat threhold;    threshold(color,threhold,200,255,8);    namedWindow("threshold");    imshow("threshold",threhold);    Mat canny;    Canny(threhold,canny,0,0);    namedWindow("canny");    imshow("canny",canny);


0 0
原创粉丝点击