Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
 ~Khan ()
 
- Public Member Functions inherited from deghosting::Deghosting
 Deghosting ()
 
virtual void loadImages (std::vector< std::string > &inputFiles)
 load images for processing
 
virtual void setFlags (const uint16_t flags)
 set advanced flags Allows to change behavior of used algorithm
 
virtual void setDebugFlags (const uint16_t debugFlags)
 set flags for debugging purposes
 
virtual void setIterationNum (const int iterations)
 set number of iterations
 
virtual void setCameraResponse (EMoR response)
 set camera response function set camera response function in EMoR format
 
virtual void setVerbosity (int verbosity)
 set verbosity level
 
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
 
float Kh (ProcessImagePixelType x)
 transform image using EMoR response
 
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
 
void convertImage (ImageType *in, ProcessImageTypePtr &out, vigra::VigraTrueType)
 
void importRGBImage (vigra::ImageImportInfo &info, ImageType *img, vigra::VigraFalseType)
 import RGB image
 
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
 

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< ImageTypeImagePtr
 
typedef vigra::BasicImage< floatProcessImageType
 
typedef std::shared_ptr< ProcessImageTypeProcessImageTypePtr
 

Detailed Description

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

Definition at line 77 of file khan.h.

Member Typedef Documentation

◆ ImageType

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

Definition at line 84 of file khan.h.

◆ ProcessImagePixelType

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

Definition at line 87 of file khan.h.

◆ ProcessImageTraverser

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

Definition at line 86 of file khan.h.

◆ ProcessImageType

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

Definition at line 85 of file khan.h.

◆ ProcessImageTypePtr

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

Definition at line 88 of file khan.h.

◆ srcIsScalar

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

Definition at line 89 of file khan.h.

Constructor & Destructor Documentation

◆ Khan()

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 
)

◆ ~Khan()

template<class PixelType >
deghosting::Khan< PixelType >::~Khan ( )
inline

Definition at line 82 of file khan.h.

Member Function Documentation

◆ convertImage() [1/2]

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

◆ convertImage() [2/2]

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

Definition at line 219 of file khan.h.

References threshold().

◆ createWeightMasks()

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, flags, iterations, NEIGHB_DIST, deghosting::SAVE_INITWEIGHTS, threshold(), verbosity, and X.

◆ importRGBImage() [1/2]

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::importImageAlpha(), and threshold().

◆ importRGBImage() [2/2]

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

Definition at line 225 of file khan.h.

References vigra::importImageAlpha(), and threshold().

◆ Kh()

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.

◆ preprocessImage()

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, flags, and threshold().

◆ setSigma()

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, and threshold().

Member Data Documentation

◆ denom

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

Definition at line 95 of file khan.h.

◆ PIPOW

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

Definition at line 93 of file khan.h.

◆ processImages

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

Definition at line 100 of file khan.h.

◆ sigma

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

Definition at line 97 of file khan.h.

◆ weights

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: