Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/374.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
OpenCV反锐化掩码Java实现_Java_Opencv_Image Processing_Implementation - Fatal编程技术网

OpenCV反锐化掩码Java实现

OpenCV反锐化掩码Java实现,java,opencv,image-processing,implementation,Java,Opencv,Image Processing,Implementation,我正在尝试实现我在 编辑:这是算法 Mat blurred; double sigma = 1, threshold = 5, amount = 1; GaussianBlur(img, blurred, Size(), sigma, sigma); Mat lowContrastMask = abs(img - blurred) < threshold; Mat sharpened = img*(1+amount) + blurred*(-amount); img.copyTo(shar

我正在尝试实现我在

编辑:这是算法

Mat blurred; double sigma = 1, threshold = 5, amount = 1;
GaussianBlur(img, blurred, Size(), sigma, sigma);
Mat lowContrastMask = abs(img - blurred) < threshold;
Mat sharpened = img*(1+amount) + blurred*(-amount);
img.copyTo(sharpened, lowContrastMask);
Mat模糊;双西格玛=1,阈值=5,金额=1;
高斯模糊(img,模糊,Size(),sigma,sigma);
Mat低对比度掩模=abs(img-模糊)<阈值;
磨光毡=img*(1+数量)+模糊*(-数量);
图像复制(锐化、低对比度掩模);
我被困在这里:

//  Mat lowContrastMask = abs(img - blurred) < threshold;

    Mat lowContrastMask = new Mat();
    Core.absdiff(source, destination, lowContrastMask);
//Mat低对比度遮罩=abs(img-模糊)<阈值;
Mat低对比度掩码=新Mat();
Core.absdiff(源、目标、低对比度掩码);

我不知道如何实现“您可以使用
threshold

Imgproc.threshold(lowContrastMask, lowContrastMask, 0, thresh, Imgproc.THRESH_BINARY_INV)

你的链接没有指向任何算法,只是OpenCV docI更新了问题它没有给出任何错误,但是结果不是很好。我想我的算法有很多错误。