Optimized Belief Propagation (CPU and GPU)
SmoothImage Class Referenceabstract

Class for smoothing the images before running BP. Smoothing image always uses float data type. More...

#include <SmoothImage.h>

Inheritance diagram for SmoothImage:
Collaboration diagram for SmoothImage:

Public Member Functions

 SmoothImage (const ParallelParams &parallel_params)
 
virtual void operator() (const BpImage< unsigned int > &in_image, float sigma, float *smoothed_image) const =0
 Function to use the image filter to apply a guassian filter to the a single image.
Input images have each pixel stored as an unsigned int (value between 0 and 255 assuming 8-bit grayscale image used).
Output filtered images have each pixel stored as a float after the image has been smoothed with a Gaussian filter of sigma.
Mask is normalized so it integrates to one. More...
 

Protected Member Functions

std::vector< float > MakeFilter (float sigma) const
 Create a Gaussian filter from a sigma value. More...
 

Protected Attributes

const ParallelParamsparallel_params_
 Parallel parameters to use parallel operations (number of threads on CPU / thread block config in CUDA) More...
 

Detailed Description

Class for smoothing the images before running BP. Smoothing image always uses float data type.

Definition at line 49 of file SmoothImage.h.

Constructor & Destructor Documentation

◆ SmoothImage()

SmoothImage::SmoothImage ( const ParallelParams parallel_params)
inlineexplicit

Definition at line 52 of file SmoothImage.h.

Member Function Documentation

◆ MakeFilter()

std::vector< float > SmoothImage::MakeFilter ( float  sigma) const
protected

Create a Gaussian filter from a sigma value.

Parameters
sigma
Returns
Generated Gaussian filter

Definition at line 30 of file SmoothImage.cpp.

Here is the caller graph for this function:

◆ operator()()

virtual void SmoothImage::operator() ( const BpImage< unsigned int > &  in_image,
float  sigma,
float *  smoothed_image 
) const
pure virtual

Function to use the image filter to apply a guassian filter to the a single image.
Input images have each pixel stored as an unsigned int (value between 0 and 255 assuming 8-bit grayscale image used).
Output filtered images have each pixel stored as a float after the image has been smoothed with a Gaussian filter of sigma.
Mask is normalized so it integrates to one.

Parameters
in_image
sigma
smoothed_image

Implemented in SmoothImageCUDA, and SmoothImageCPU.

Member Data Documentation

◆ parallel_params_

const ParallelParams& SmoothImage::parallel_params_
protected

Parallel parameters to use parallel operations (number of threads on CPU / thread block config in CUDA)

Definition at line 86 of file SmoothImage.h.


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