Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
deghosting::Khan< PixelType > Class Template Reference

#include <khan.h>

Inheritance diagram for deghosting::Khan< PixelType >:
Inheritance graph

Public Member Functions

 Khan (std::vector< std::string > &inputFiles, const uint16_t flags, const uint16_t debugFlags, int iterations, double sigma, int verbosity)
 
virtual std::vector< FImagePtrcreateWeightMasks () override
 create weight masks create weight masks for masking out ghosting regions More...
 
 ~Khan ()
 
- Public Member Functions inherited from deghosting::Deghosting
 Deghosting ()
 
virtual void loadImages (std::vector< std::string > &inputFiles)
 load images for processing More...
 
virtual void setFlags (const uint16_t flags)
 set advanced flags Allows to change behavior of used algorithm More...
 
virtual void setDebugFlags (const uint16_t debugFlags)
 set flags for debugging purposes More...
 
virtual void setIterationNum (const int iterations)
 set number of iterations More...
 
virtual void setCameraResponse (EMoR response)
 set camera response function set camera response function in EMoR format More...
 
virtual void setVerbosity (int verbosity)
 set verbosity level More...
 
virtual ~Deghosting ()
 
vigra::Rect2D getOutputROI () const
 
std::vector< vigra::Rect2D > getInputROIs () const
 

Protected Types

typedef ImageTypes< PixelType >
::ImageType 
ImageType
 
typedef ImageTypes< PixelType >
::ProcessImageType 
ProcessImageType
 
typedef ImageTypes< PixelType >
::ProcessImageType::traverser 
ProcessImageTraverser
 
typedef ImageTypes< PixelType >
::ProcessImageType::PixelType 
ProcessImagePixelType
 
typedef ImageTypes< PixelType >
::ProcessImageTypePtr 
ProcessImageTypePtr
 
typedef vigra::NumericTraits
< PixelType >::isScalar 
srcIsScalar
 

Protected Member Functions

void setSigma (double sigma)
 set sigma sets sigma for gaussian weigting function More...
 
float Kh (ProcessImagePixelType x)
 transform image using EMoR response More...
 
void convertImage (ImageType *in, ProcessImageTypePtr &out, vigra::VigraFalseType)
 convert image for internal use if input image is RGB then convert it to L*a*b if input image is grayscale then only copy image More...
 
void convertImage (ImageType *in, ProcessImageTypePtr &out, vigra::VigraTrueType)
 
void importRGBImage (vigra::ImageImportInfo &info, ImageType *img, vigra::VigraFalseType)
 import RGB image More...
 
void importRGBImage (vigra::ImageImportInfo &info, ImageType *img, vigra::VigraTrueType)
 
void preprocessImage (unsigned int i, FImagePtr &weight, ProcessImageTypePtr &output)
 function to preprocess input image This function loads image, linearize it using EMoR (FIXME), tranform it using logarithm or gamma if input images are HDR More...
 

Protected Attributes

double PIPOW
 
double denom
 
double sigma
 
std::vector< ProcessImageTypePtrprocessImages
 
std::vector< FImagePtrweights
 
- Protected Attributes inherited from deghosting::Deghosting
std::vector
< vigra::ImageImportInfo > 
inputFiles
 
std::vector< vigra::Rect2D > m_inputROI
 
uint16_t flags
 
uint16_t debugFlags
 
int iterations
 
EMoR response
 
int verbosity
 
vigra::Rect2D m_outputROI
 

Additional Inherited Members

- Private Types inherited from deghosting::ImageTypes< PixelType >
typedef vigra::FImage ImageType
 
typedef std::shared_ptr
< ImageType
ImagePtr
 
typedef vigra::BasicImage< float > ProcessImageType
 
typedef std::shared_ptr
< ProcessImageType
ProcessImageTypePtr
 

Detailed Description

template<class PixelType>
class deghosting::Khan< PixelType >

Definition at line 77 of file khan.h.

Member Typedef Documentation

template<class PixelType>
typedef ImageTypes<PixelType>::ImageType deghosting::Khan< PixelType >::ImageType
protected

Definition at line 84 of file khan.h.

template<class PixelType>
typedef ImageTypes<PixelType>::ProcessImageType::PixelType deghosting::Khan< PixelType >::ProcessImagePixelType
protected

Definition at line 87 of file khan.h.

template<class PixelType>
typedef ImageTypes<PixelType>::ProcessImageType::traverser deghosting::Khan< PixelType >::ProcessImageTraverser
protected

Definition at line 86 of file khan.h.

template<class PixelType>
typedef ImageTypes<PixelType>::ProcessImageType deghosting::Khan< PixelType >::ProcessImageType
protected

Definition at line 85 of file khan.h.

template<class PixelType>
typedef ImageTypes<PixelType>::ProcessImageTypePtr deghosting::Khan< PixelType >::ProcessImageTypePtr
protected

Definition at line 88 of file khan.h.

template<class PixelType>
typedef vigra::NumericTraits<PixelType>::isScalar deghosting::Khan< PixelType >::srcIsScalar
protected

Definition at line 89 of file khan.h.

Constructor & Destructor Documentation

template<class PixelType >
deghosting::Khan< PixelType >::Khan ( std::vector< std::string > &  inputFiles,
const uint16_t  flags,
const uint16_t  debugFlags,
int  iterations,
double  sigma,
int  verbosity 
)
template<class PixelType>
deghosting::Khan< PixelType >::~Khan ( )
inline

Definition at line 82 of file khan.h.

Member Function Documentation

template<class PixelType >
void deghosting::Khan< PixelType >::convertImage ( ImageType in,
ProcessImageTypePtr out,
vigra::VigraFalseType   
)
protected

convert image for internal use if input image is RGB then convert it to L*a*b if input image is grayscale then only copy image

Definition at line 212 of file khan.h.

References vigra_ext::destImage(), vigra_ext::srcImageRange(), and vigra_ext::transformImage().

template<class PixelType >
void deghosting::Khan< PixelType >::convertImage ( ImageType in,
ProcessImageTypePtr out,
vigra::VigraTrueType   
)
protected
template<class PixelType >
std::vector< FImagePtr > deghosting::Khan< PixelType >::createWeightMasks ( )
overridevirtual

create weight masks create weight masks for masking out ghosting regions

Implements deghosting::Deghosting.

Definition at line 301 of file khan.h.

References deghosting::ADV_MULTIRES, deghosting::ADV_ONLYP, debugFlags, vigra_ext::destImage(), vigra_ext::destImageRange(), flags, iterations, NEIGHB_DIST, deghosting::SAVE_INITWEIGHTS, vigra_ext::srcImageRange(), vigra_ext::transformImage(), verbosity, and X.

Referenced by main().

template<class PixelType >
void deghosting::Khan< PixelType >::importRGBImage ( vigra::ImageImportInfo &  info,
ImageType img,
vigra::VigraFalseType   
)
protected

import RGB image

Definition at line 242 of file khan.h.

References vigra_ext::destImage(), and vigra::importImageAlpha().

template<class PixelType >
void deghosting::Khan< PixelType >::importRGBImage ( vigra::ImageImportInfo &  info,
ImageType img,
vigra::VigraTrueType   
)
protected
template<class PixelType >
float deghosting::Khan< PixelType >::Kh ( ProcessImagePixelType  x)
inlineprotected

transform image using EMoR response

Parameters
inputFilefilename of image to be transformed
*pInputImgFRGBImage to be transformed kernel function Standard probability density function

Definition at line 172 of file khan.h.

References PI, and sigma.

template<class PixelType >
void deghosting::Khan< PixelType >::preprocessImage ( unsigned int  i,
FImagePtr weight,
ProcessImageTypePtr output 
)
protected

function to preprocess input image This function loads image, linearize it using EMoR (FIXME), tranform it using logarithm or gamma if input images are HDR

Definition at line 254 of file khan.h.

References deghosting::ADV_GAMMA, vigra_ext::destImage(), flags, vigra_ext::srcImageRange(), and vigra_ext::transformImage().

template<class PixelType >
void deghosting::Khan< PixelType >::setSigma ( double  sigma)
protected

set sigma sets sigma for gaussian weigting function

Definition at line 167 of file khan.h.

References sigma.

Member Data Documentation

template<class PixelType>
double deghosting::Khan< PixelType >::denom
protected

Definition at line 95 of file khan.h.

template<class PixelType>
double deghosting::Khan< PixelType >::PIPOW
protected

Definition at line 93 of file khan.h.

template<class PixelType>
std::vector<ProcessImageTypePtr> deghosting::Khan< PixelType >::processImages
protected

Definition at line 100 of file khan.h.

template<class PixelType>
double deghosting::Khan< PixelType >::sigma
protected

Definition at line 97 of file khan.h.

template<class PixelType>
std::vector<FImagePtr> deghosting::Khan< PixelType >::weights
protected

Definition at line 101 of file khan.h.


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