From: dirk Date: Mon, 22 Feb 2016 15:25:05 +0000 (+0100) Subject: Added waveletDenoise to Magick++. X-Git-Tag: 7.0.1-0~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5afc3a6a4c6cc8a2226bbd96ea60c80d975b56cc;p=imagemagick Added waveletDenoise to Magick++. --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 94f3a3405..a45782667 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -4802,6 +4802,17 @@ void Magick::Image::wave(const double amplitude_,const double wavelength_) ThrowImageException; } +void Magick::Image::waveletDenoise(const double threshold_) +{ + MagickCore::Image + *newImage; + + GetPPException; + newImage=WaveletDenoiseImage(constImage(),threshold_,exceptionInfo); + replaceImage(newImage); + ThrowImageException; +} + void Magick::Image::whiteThreshold(const std::string &threshold_) { modifyImage(); diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index 457e9bd47..91e394f8d 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -1456,6 +1456,9 @@ namespace Magick // Map image pixels to a sine wave void wave(const double amplitude_=25.0,const double wavelength_=150.0); + // Removes noise from the image using a wavelet transform. + void waveletDenoise(const double threshold_); + // Forces all pixels above the threshold into white while leaving all // pixels at or below the threshold unchanged. void whiteThreshold(const std::string &threshold_); diff --git a/Magick++/lib/Magick++/Include.h b/Magick++/lib/Magick++/Include.h index 7adf1c0c3..f85d7e2d6 100644 --- a/Magick++/lib/Magick++/Include.h +++ b/Magick++/lib/Magick++/Include.h @@ -1479,6 +1479,7 @@ namespace Magick using MagickCore::UnsharpMaskImage; using MagickCore::VignetteImage; using MagickCore::WaveImage; + using MagickCore::WaveletDenoiseImage; using MagickCore::WhiteThresholdImage; using MagickCore::WriteImage;