摘要: 1.函数相加使用 cv::add(image1,image2,result);或 result=0.5*image1+0.5image2保存图像:inwrite(“result.jpg”,result); 阅读全文
posted @ 2014-03-12 14:30 我的新世界 阅读(68) 评论(0) 推荐(0)
摘要: void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArraydst, int dtype=-1)Parameterssrc1 – First source array.alpha – Weight for the first array elements.src2 – Second source array of the same size and channel number as src1 .beta – Weight for the secon 阅读全文
posted @ 2014-03-12 11:12 我的新世界 阅读(433) 评论(0) 推荐(0)
摘要: #include #include #include #include using namespace cv;void sharpenImage1(const cv::Mat& image, cv::Mat &result){ cv::Mat kelnel (3,3,CV_32F,cv::Scalar(0)); //构造核函数 //对核元素进行赋值 kelnel.at(1,1)=5.0; kelnel.at(0,1)=-1.0; kelnel.at(2,1)=-1.0; kelnel.at(1,0)=-1.0; kelnel.at(1,2)=-... 阅读全文
posted @ 2014-03-11 15:45 我的新世界 阅读(424) 评论(0) 推荐(0)
摘要: double duration;duration = static_cast(cv::getTickCount()); 阅读全文
posted @ 2014-03-11 15:44 我的新世界 阅读(292) 评论(0) 推荐(0)
摘要: #include #include #include 若想省去cv::的麻烦,需在程序前添加 using namespace cv; 阅读全文
posted @ 2014-03-11 14:58 我的新世界 阅读(120) 评论(0) 推荐(0)