TuttleOFX
1
|
Base class for the denoising processor. More...
#include <NLMDenoiserProcess.hpp>
Public Types | |
typedef View::value_type | Pixel |
typedef boost::gil::channel_type< View > ::type | Channel |
Public Member Functions | |
NLMDenoiserProcess (NLMDenoiserPlugin &instance) | |
~NLMDenoiserProcess () | |
void | setup (const OFX::RenderArguments &args) |
void | preProcess () |
called before any MP is done | |
void | multiThreadProcessImages (const OfxRectI &procWindowRoW) |
Function called by rendering thread each time a process must be done. | |
double | computeBandwidth () |
void | nlMeans (View &dst, const OfxRectI &procWindow, const NlmParams ¶ms) |
Function called to apply nl-means denoising. | |
void | computeWeights (const std::vector< View > &srcViews, const OfxRectI &procWindow, boost::gil::rgba32f_view_t &view_wc, boost::gil::rgba32f_view_t &view_norm, const NlmParams ¶ms) |
Protected Member Functions | |
void | addFrame (const OfxRectI &dBounds, const int dstBitDepth, const int dstComponents, const double time, const int z) |
Protected Attributes | |
OFX::BooleanParam * | _paramOptimized |
Perform optimization (quality++, speed+++) | |
OFX::DoubleParam * | _paramPreBlurring |
Perform pre blurring. | |
OFX::IntParam * | _paramPatchRadius |
Patch size for nl-means algorithm. | |
OFX::IntParam * | _paramRegionRadius |
Region radius size. | |
OFX::IntParam * | _paramDepth |
depth for nl-means algorithm | |
OFX::DoubleParam * | _paramRedStrength |
Red color effect mix. | |
OFX::DoubleParam * | _paramGreenStrength |
Green color effect mix. | |
OFX::DoubleParam * | _paramBlueStrength |
Blue color effect mix. | |
OFX::DoubleParam * | _paramRedGrainSize |
Red color effect bandwidth. | |
OFX::DoubleParam * | _paramGreenGrainSize |
Green color effect bandwidth. | |
OFX::DoubleParam * | _paramBlueGrainSize |
Blue color effect bandwidth. | |
std::vector< View > | _srcViews |
Array of source image view (3D-NLMeans) | |
boost::ptr_vector< OFX::Image > | _srcImgs |
NLMDenoiserPlugin & | _plugin |
Rendering plugin. | |
int | _margin |
Margin. | |
OfxRectI | _upScaledBounds |
Upscaled source bounds (margin upscaling) |
Base class for the denoising processor.
Definition at line 40 of file NLMDenoiserProcess.hpp.
typedef boost::gil::channel_type<View>::type tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::Channel |
Definition at line 45 of file NLMDenoiserProcess.hpp.
typedef View::value_type tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::Pixel |
Reimplemented from tuttle::plugin::ImageGilProcessor< View >.
Definition at line 44 of file NLMDenoiserProcess.hpp.
tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess | ( | NLMDenoiserPlugin & | instance | ) |
Definition at line 33 of file NLMDenoiserProcess.tcc.
References tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramBlueGrainSize, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramBlueStrength, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramDepth, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramGreenGrainSize, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramGreenStrength, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramOptimized, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramPatchRadius, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramPreBlurring, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRedGrainSize, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRedStrength, tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRegionRadius, OFX::ParamSet::fetchBooleanParam(), OFX::ParamSet::fetchDoubleParam(), OFX::ParamSet::fetchIntParam(), tuttle::plugin::nlmDenoiser::kParamBlueGrainSize(), tuttle::plugin::nlmDenoiser::kParamBlueStrength(), tuttle::plugin::nlmDenoiser::kParamDepth(), tuttle::plugin::nlmDenoiser::kParamGreenGrainSize(), tuttle::plugin::nlmDenoiser::kParamGreenStrength(), tuttle::plugin::nlmDenoiser::kParamOptimization(), tuttle::plugin::nlmDenoiser::kParamPatchRadius(), tuttle::plugin::nlmDenoiser::kParamPreBlurring(), tuttle::plugin::nlmDenoiser::kParamRedGrainSize(), tuttle::plugin::nlmDenoiser::kParamRedStrength(), and tuttle::plugin::nlmDenoiser::kParamRegionRadius().
tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::~NLMDenoiserProcess | ( | ) |
Definition at line 54 of file NLMDenoiserProcess.tcc.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame | ( | const OfxRectI & | dBounds, |
const int | dstBitDepth, | ||
const int | dstComponents, | ||
const double | time, | ||
const int | z | ||
) | [protected] |
Definition at line 59 of file NLMDenoiserProcess.tcc.
References OFX::Image::getBounds(), OFX::Image::getPixelComponents(), OFX::Image::getPixelData(), OFX::Image::getPixelDepth(), OFX::Image::getRowDistanceBytes(), tuttle::plugin::viewer::img, TUTTLE_INFO, TUTTLE_TLOG, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
double tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::computeBandwidth | ( | ) |
Definition at line 187 of file NLMDenoiserProcess.tcc.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::computeWeights | ( | const std::vector< View > & | srcViews, |
const OfxRectI & | procWindow, | ||
boost::gil::rgba32f_view_t & | view_wc, | ||
boost::gil::rgba32f_view_t & | view_norm, | ||
const NlmParams & | params | ||
) |
Definition at line 306 of file NLMDenoiserProcess.tcc.
References tuttle::plugin::nlmDenoiser::NlmParams::bws, tuttle::max(), tuttle::min(), tuttle::imageUtils::noise_variance(), tuttle::plugin::nlmDenoiser::NlmParams::patchRadius, tuttle::plugin::nlmDenoiser::NlmParams::regionRadius, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::multiThreadProcessImages | ( | const OfxRectI & | procWindowRoW | ) | [virtual] |
Function called by rendering thread each time a process must be done.
[in] | procWindowRoW | Processing window in RoW |
Implements tuttle::plugin::ImageProcessor.
Definition at line 159 of file NLMDenoiserProcess.tcc.
References tuttle::plugin::nlmDenoiser::NlmParams::bws, tuttle::plugin::nlmDenoiser::NlmParams::mix, tuttle::plugin::nlmDenoiser::NlmParams::patchRadius, tuttle::plugin::nlmDenoiser::NlmParams::preBlurring, tuttle::plugin::nlmDenoiser::NlmParams::regionRadius, terry::subimage_view(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::nlMeans | ( | View & | dst, |
const OfxRectI & | procWindow, | ||
const NlmParams & | params | ||
) |
Function called to apply nl-means denoising.
[out] | dst | Destination image view |
[in] | procWindow | |
[in] | params |
Definition at line 210 of file NLMDenoiserProcess.tcc.
References terry::fill_black(), terry::max_value(), tuttle::plugin::nlmDenoiser::NlmParams::mix, tuttle::plugin::nlmDenoiser::NlmParams::patchRadius, tuttle::rectanglesIntersection(), tuttle::plugin::nlmDenoiser::NlmParams::regionRadius, terry::subimage_view(), boost::gil::view(), OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::preProcess | ( | ) | [virtual] |
called before any MP is done
Reimplemented from tuttle::plugin::ImageProcessor.
Definition at line 135 of file NLMDenoiserProcess.tcc.
References height, tuttle::min(), and width.
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::setup | ( | const OFX::RenderArguments & | args | ) | [virtual] |
Reimplemented from tuttle::plugin::ImageGilProcessor< View >.
Definition at line 89 of file NLMDenoiserProcess.tcc.
References tuttle::max(), OfxRangeD::max, tuttle::min(), OfxRangeD::min, OFX::RenderArguments::time, TUTTLE_INFO, TUTTLE_TLOG_VAR2, OfxRectI::x1, OfxRectI::x2, OfxRectI::y1, and OfxRectI::y2.
int tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_margin [protected] |
Margin.
Definition at line 65 of file NLMDenoiserProcess.hpp.
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramBlueGrainSize [protected] |
Blue color effect bandwidth.
Definition at line 58 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramBlueStrength [protected] |
Blue color effect mix.
Definition at line 55 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::IntParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramDepth [protected] |
depth for nl-means algorithm
Definition at line 52 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramGreenGrainSize [protected] |
Green color effect bandwidth.
Definition at line 57 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramGreenStrength [protected] |
Green color effect mix.
Definition at line 54 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::BooleanParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramOptimized [protected] |
Perform optimization (quality++, speed+++)
Definition at line 48 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::IntParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramPatchRadius [protected] |
Patch size for nl-means algorithm.
Definition at line 50 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramPreBlurring [protected] |
Perform pre blurring.
Definition at line 49 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRedGrainSize [protected] |
Red color effect bandwidth.
Definition at line 56 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::DoubleParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRedStrength [protected] |
Red color effect mix.
Definition at line 53 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
OFX::IntParam* tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_paramRegionRadius [protected] |
Region radius size.
Definition at line 51 of file NLMDenoiserProcess.hpp.
Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().
NLMDenoiserPlugin& tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_plugin [protected] |
Rendering plugin.
Definition at line 63 of file NLMDenoiserProcess.hpp.
boost::ptr_vector< OFX::Image > tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_srcImgs [protected] |
Definition at line 61 of file NLMDenoiserProcess.hpp.
std::vector< View > tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_srcViews [protected] |
Array of source image view (3D-NLMeans)
Definition at line 60 of file NLMDenoiserProcess.hpp.
OfxRectI tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_upScaledBounds [protected] |
Upscaled source bounds (margin upscaling)
Definition at line 66 of file NLMDenoiserProcess.hpp.