Optimized Belief Propagation (CPU and GPU)
|
Class for smoothing the images before running BP. Smoothing image always uses float data type. More...
#include <SmoothImage.h>
Public Member Functions | |
SmoothImage (const ParallelParams ¶llel_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 ParallelParams & | parallel_params_ |
Parallel parameters to use parallel operations (number of threads on CPU / thread block config in CUDA) More... | |
Class for smoothing the images before running BP. Smoothing image always uses float data type.
Definition at line 49 of file SmoothImage.h.
|
inlineexplicit |
Definition at line 52 of file SmoothImage.h.
|
protected |
Create a Gaussian filter from a sigma value.
sigma |
Definition at line 30 of file SmoothImage.cpp.
|
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.
in_image | |
sigma | |
smoothed_image |
Implemented in SmoothImageCUDA, and SmoothImageCPU.
|
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.