資源簡介
用OpenCV實現Photoshop算法(九): 高反差保留

代碼片段和文件信息
#include?
#include?“opencv2/core.hpp“
#include?“opencv2/imgproc.hpp“
#include?“opencv2/highgui.hpp“
#include?“Filter.hpp“
using?namespace?std;
using?namespace?cv;
static?Mat?src;
static?Mat?dst;
static?int?radius?=?10;
static?void?callbackAdjust(int??void?*)
{
Filter::HighPass(src?dst?radius?/?10.0?);
imshow(“photo“?dst);
}
int?main()
{
src?=?imread(“building.jpg“);
if?(?!src.data?)?{
cout?<“error?read?image“?< return?-1;
}
namedWindow(“photo“);
createTrackbar(“radius“?“photo“?&radius?100?callbackAdjust);
callbackAdjust(0?0);
waitKey();
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????124965??2016-07-09?17:08??building.jpg
?????文件????????649??2016-09-11?21:19??demo_HighPass.cpp
?????文件???????2002??2016-07-05?23:47??Filter.hpp
?????文件???????8703??2016-09-11?21:17??Filter.cpp
-----------?---------??----------?-----??----
???????????????136319????????????????????4
評論
共有 條評論