标签:log png http 处理 dev struct imshow csharp pen
//腐蚀 int g_nErodeValue; int g_nErodeType; Mat g_mElement; //这2个消息处理函数可以合并为1个 void on_ChangeErodeValue(int,void*) { if(g_nErodeValue>0) { g_mElement=getStructuringElement(g_nErodeType,Size(g_nErodeValue,g_nErodeValue)); erode(g_srcImage_Contrast,g_dstImage_Contrast,g_mElement); imshow("腐蚀滤波",g_dstImage_Contrast); } } void on_ChangeErodeType(int,void*) { g_mElement=getStructuringElement(g_nErodeType,Size(g_nErodeValue,g_nErodeValue)); erode(g_srcImage_Contrast,g_dstImage_Contrast,g_mElement); imshow("腐蚀滤波",g_dstImage_Contrast); } void Test_ErodeBlur() { namedWindow("腐蚀滤波"); namedWindow("原图"); g_srcImage_Contrast=imread("D:\\OpenCV Projects\\OpenCV_Test_Image\\16.jpg"); g_nErodeValue=1; g_nErodeType=0; createTrackbar("erode_value","腐蚀滤波",&g_nErodeValue,30,on_ChangeErodeValue); createTrackbar("erode_type","腐蚀滤波",&g_nErodeType,2,on_ChangeErodeType); on_ChangeErodeValue(g_nErodeValue,0); on_ChangeErodeType(g_nErodeValue,0); imshow("原图",g_srcImage_Contrast); }
标签:log png http 处理 dev struct imshow csharp pen
原文地址:http://www.cnblogs.com/foggia2004/p/6596812.html