TuttleOFX  1
tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View > Class Template Reference

Base class for the denoising processor. More...

#include <NLMDenoiserProcess.hpp>

Inheritance diagram for tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >:
Collaboration diagram for tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >:

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 &params)
 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 &params)

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)

Detailed Description

template<class View>
class tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >

Base class for the denoising processor.

Definition at line 40 of file NLMDenoiserProcess.hpp.


Member Typedef Documentation

template<class View>
typedef boost::gil::channel_type<View>::type tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::Channel

Definition at line 45 of file NLMDenoiserProcess.hpp.

template<class View>
typedef View::value_type tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::Pixel

Reimplemented from tuttle::plugin::ImageGilProcessor< View >.

Definition at line 44 of file NLMDenoiserProcess.hpp.


Constructor & Destructor Documentation

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().

Here is the call graph for this function:

Definition at line 54 of file NLMDenoiserProcess.tcc.


Member Function Documentation

template<class View >
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::addFrame ( const OfxRectI dBounds,
const int  dstBitDepth,
const int  dstComponents,
const double  time,
const int  z 
) [protected]
template<class View >
double tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::computeBandwidth ( )

Definition at line 187 of file NLMDenoiserProcess.tcc.

template<class View>
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 
)
template<class View >
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::multiThreadProcessImages ( const OfxRectI procWindowRoW) [virtual]

Function called by rendering thread each time a process must be done.

Parameters:
[in]procWindowRoWProcessing 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.

Here is the call graph for this function:

template<class View >
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::nlMeans ( View &  dst,
const OfxRectI procWindow,
const NlmParams params 
)

Function called to apply nl-means denoising.

Parameters:
[out]dstDestination image view
[in]procWindow
[in]params
Todo:
: use memory allocated by host using memorySuite

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.

Here is the call graph for this function:

template<class View >
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.

Here is the call graph for this function:

template<class View >
void tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::setup ( const OFX::RenderArguments args) [virtual]

Field Documentation

template<class View>
int tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_margin [protected]

Margin.

Definition at line 65 of file NLMDenoiserProcess.hpp.

Blue color effect bandwidth.

Definition at line 58 of file NLMDenoiserProcess.hpp.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().

depth for nl-means algorithm

Definition at line 52 of file NLMDenoiserProcess.hpp.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().

Green color effect bandwidth.

Definition at line 57 of file NLMDenoiserProcess.hpp.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().

Perform optimization (quality++, speed+++)

Definition at line 48 of file NLMDenoiserProcess.hpp.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().

Patch size for nl-means algorithm.

Definition at line 50 of file NLMDenoiserProcess.hpp.

Referenced by tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::NLMDenoiserProcess().

Rendering plugin.

Definition at line 63 of file NLMDenoiserProcess.hpp.

template<class View>
boost::ptr_vector< OFX::Image > tuttle::plugin::nlmDenoiser::NLMDenoiserProcess< View >::_srcImgs [protected]

Definition at line 61 of file NLMDenoiserProcess.hpp.

template<class View>
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.

Upscaled source bounds (margin upscaling)

Definition at line 66 of file NLMDenoiserProcess.hpp.


The documentation for this class was generated from the following files: