KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
DTLib::CImg< T > Class Template Reference

#include <img.h>

Public Member Functions

 CImg ()
 
 ~CImg ()
 
 CImg (const int Width, const int Height, const bool bMakeBuf=true, const bool bZero=false)
 
 CImg (const T *pBuf, const int Width, const int Height, const bool bCopy=false)
 
 CImg (CImg< T > &Img, const bool bCopy)
 
 CImg (CImg< T > &InImg, const int &Padding=0)
 
 CImg (CImgVec< T > &ImgVec, const int &iFrame, const bool &bCopy=false)
 
 CImg (CImgVec< T > &ImgVec, const int &nCols, const int &nRows)
 
GetPix (const int &x, const int &y)
 
GetPix (const int &i)
 
void SetPix (const int &x, const int &y, const T &Val)
 
void SetPix (const int &i, const T &Val)
 
void AddToPix (const int &x, const int &y, const T &Val)
 
void Set_pBuffer (const T *pBuf, const int Width, const int Height, const bool bCopy=false)
 IMPLEMENTATION. More...
 
int Width () const
 
int Height () const
 
int nPixels () const
 
bool bDelete ()
 
T * pBuffer ()
 
T * pROI ()
 
int ROIStartX ()
 
int ROIEndX ()
 
int ROIStartY ()
 
int ROIEndY ()
 
int ROISkipCols ()
 
int ROIWidth ()
 
int ROIHeight ()
 
int ROIOffset ()
 
int ROISize ()
 
void Report ()
 
bool IsEmpty ()
 
bool IsNotEmpty ()
 
bool ReadRaw (const char *strFilename)
 
bool WriteRaw (const char *strFilename)
 
void ClearROI ()
 
void ChangeROI (const int StartX, const int EndX, const int StartY, const int EndY)
 
void SafeChangeROI (const int StartX, const int EndX, const int StartY, const int EndY)
 
void ReduceROI (int N=1)
 
void SetOutROIVal (const T &Val)
 
void SetOutROIVal (const T &TopVal, const T &BotVal, const T &LeftVal, const T &RightVal)
 
void ReflectToROI ()
 
void SetROIVal (const T &Val)
 
void OutPadROI (const int &Padding)
 
void f2b (CImg< BYTE > &ByteImg, BYTE BGVal=0)
 
void f2b (CImg< BYTE > &ByteImg, float Min, float Max, BYTE BGVal=0)
 
void f2bNoscale (CImg< BYTE > &ByteImg, BYTE BGVal=0)
 
void b2f (CImg< float > &FloatImg, float BGVal=0.0f)
 
void i2f (CImg< float > &FloatImg, float BGVal=0.0f)
 
void ToFloat (CImg< float > &FloatImg, float BGVal=0.0f)
 
void ReduceSize (const int &NewWidth, const int &NewHeight)
 
void Crop (const int &N)
 
void FreeMemory ()
 
void CopyFromBuf (T *pBuf)
 
void CopyFromBuf (T *pBuf, const int &StartX, const int &EndX, const int &StartY, const int &EndY)
 
void CopyToBuf (T *pBuf)
 
void Attach (T *pBuf)
 
void Attach (T *pBuf, const int Width, const int Height, const bool bDelete=false)
 
T * Detach ()
 
void Minpix (int &x, int &y, T &Val)
 
void Maxpix (int &x, int &y, T &Val)
 
void Maxpix (T &Val)
 
void MinMax (T &Min, T &Max)
 
void ReportMinMax ()
 
float MeanLuminance ()
 
void MuSig (float &mu, float &sig)
 
float SumAbs ()
 
void Normalize (bool full_range=false)
 
void ChangeRange (const BYTE &NewMin, const BYTE &NewMax)
 
void ChangeRange (const float &NewMin, const float &NewMax)
 
void FixThetaRanges (const bool &bHalfPhase=true)
 
void MuFilter (CImg< float > &MuImg, CImg< float > &TImg, int dx, int dy)
 
void MuFilter (CImg< float > &MuImg, int dx, int dy)
 
void MuSigFilter (CImg< float > &MuImg, CImg< float > &SigImg, CImg< float > &TImg, CImg< float > &UImg, int dx, int dy)
 
void MuSigFilter (CImg< float > &MuImg, CImg< float > &SigImg, int dx, int dy)
 
void Pad (CImg< T > &DestImg, const int Left, const int Top, const T &Val=(T) 0)
 
void Extract (CImg< T > &DestImg, const int &Left=0, const int &Top=0)
 
void Square ()
 
void Zero ()
 
void Mul (CImg< T > &Img)
 
void Mul (const T &Val)
 
void Div (CImg< T > &Img)
 
void Div (const T &Val)
 
void Add (CImg< T > &Img)
 
void Add (const T &Val)
 
void Sub (CImg< T > &Img)
 
void Sub (const T &Val)
 
void Neg ()
 
void Log (const float &z=0.0f)
 
void HardOR (CImg< T > &Img, const T &Val=(T) 255)
 
void SoftOR (CImg< T > &Img)
 
void HardAND (CImg< T > &Img, const T &Val=(T) 255)
 
void SoftAND (CImg< T > &Img)
 
void SwapPointers (CImg< T > &InImg)
 
void SwapAll (CImg< T > &InImg)
 
void NormalizeL1 ()
 
float L2Norm ()
 
kjb_int32 nNonZeros ()
 
void Sqrt ()
 
void Val2Probability (const float &Sigma)
 
void CopyPixelsFromImgROI (CImg< T > &Img)
 
template<>
void f2b (CImg< BYTE > &ByteImg, BYTE BGVal)
 
template<>
void f2bNoscale (CImg< BYTE > &ByteImg, BYTE BGVal)
 
template<>
void f2b (CImg< BYTE > &ByteImg, float Min, float Max, BYTE BGVal)
 
template<>
void b2f (CImg< float > &FloatImg, float BGVal)
 
template<>
void i2f (CImg< float > &FloatImg, float BGVal)
 
template<>
float MeanLuminance ()
 
template<>
float MeanLuminance ()
 
template<>
void MuSig (float &mu, float &sig)
 
template<>
void MuSig (float &mu, float &sig)
 
template<>
float SumAbs ()
 
template<>
float SumAbs ()
 
template<>
void Normalize (bool full_range)
 
template<>
void Normalize (bool full_range)
 
template<>
void ChangeRange (const BYTE &NewMin, const BYTE &NewMax)
 
template<>
void ChangeRange (const float &NewMin, const float &NewMax)
 
template<>
void FixThetaRanges (const bool &bHalfPhase)
 
template<>
void Square ()
 
template<>
void Neg ()
 
template<>
void Log (const float &z)
 
template<>
void NormalizeL1 ()
 
template<>
float L2Norm ()
 
template<>
float L2Norm ()
 
template<>
void Sqrt ()
 
template<>
void Val2Probability (const float &Sigma)
 

Protected Attributes

T * m_pBuffer
 
int m_Width
 
int m_Height
 
int m_nPixels
 
bool m_bDelete
 
T * m_pROI
 
int m_ROIStartX
 
int m_ROIStartY
 
int m_ROIEndX
 
int m_ROIEndY
 
int m_ROISkipCols
 
int m_ROIWidth
 
int m_ROIHeight
 
int m_ROIOffset
 
int m_ROISize
 

Constructor & Destructor Documentation

template<class T >
DTLib::CImg< T >::CImg ( )
template<class T >
DTLib::CImg< T >::~CImg ( )
template<class T >
DTLib::CImg< T >::CImg ( const int  Width,
const int  Height,
const bool  bMakeBuf = true,
const bool  bZero = false 
)
template<class T>
DTLib::CImg< T >::CImg ( const T *  pBuf,
const int  Width,
const int  Height,
const bool  bCopy = false 
)
template<class T>
DTLib::CImg< T >::CImg ( CImg< T > &  Img,
const bool  bCopy 
)
inline
template<class T>
DTLib::CImg< T >::CImg ( CImg< T > &  InImg,
const int &  Padding = 0 
)
inline
template<class T>
DTLib::CImg< T >::CImg ( CImgVec< T > &  ImgVec,
const int &  iFrame,
const bool &  bCopy = false 
)
inline
template<class T>
DTLib::CImg< T >::CImg ( CImgVec< T > &  ImgVec,
const int &  nCols,
const int &  nRows 
)
inline

Member Function Documentation

template<class T>
void DTLib::CImg< T >::Add ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::Add ( const T &  Val)
template<class T>
void DTLib::CImg< T >::AddToPix ( const int &  x,
const int &  y,
const T &  Val 
)
inline
template<class T>
void DTLib::CImg< T >::Attach ( T *  pBuf)
inline
template<class T>
void DTLib::CImg< T >::Attach ( T *  pBuf,
const int  Width,
const int  Height,
const bool  bDelete = false 
)
inline
template<class T>
void DTLib::CImg< T >::b2f ( CImg< float > &  FloatImg,
float  BGVal = 0.0f 
)
template<>
void DTLib::CImg< BYTE >::b2f ( CImg< float > &  FloatImg,
float  BGVal 
)
inline
template<class T>
bool DTLib::CImg< T >::bDelete ( )
inline
template<class T>
void DTLib::CImg< T >::ChangeRange ( const BYTE NewMin,
const BYTE NewMax 
)
template<class T>
void DTLib::CImg< T >::ChangeRange ( const float &  NewMin,
const float &  NewMax 
)
template<>
void DTLib::CImg< BYTE >::ChangeRange ( const BYTE NewMin,
const BYTE NewMax 
)
inline
template<>
void DTLib::CImg< float >::ChangeRange ( const float &  NewMin,
const float &  NewMax 
)
inline
template<class T >
void DTLib::CImg< T >::ChangeROI ( const int  StartX,
const int  EndX,
const int  StartY,
const int  EndY 
)
template<class T >
void DTLib::CImg< T >::ClearROI ( )
template<class T>
void DTLib::CImg< T >::CopyFromBuf ( T *  pBuf)
template<class T>
void DTLib::CImg< T >::CopyFromBuf ( T *  pBuf,
const int &  StartX,
const int &  EndX,
const int &  StartY,
const int &  EndY 
)
template<class T>
void DTLib::CImg< T >::CopyPixelsFromImgROI ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::CopyToBuf ( T *  pBuf)
template<class T >
void DTLib::CImg< T >::Crop ( const int &  N)
template<class T >
T * DTLib::CImg< T >::Detach ( )
inline
template<class T>
void DTLib::CImg< T >::Div ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::Div ( const T &  Val)
template<class T>
void DTLib::CImg< T >::Extract ( CImg< T > &  DestImg,
const int &  Left = 0,
const int &  Top = 0 
)
template<class T>
void DTLib::CImg< T >::f2b ( CImg< BYTE > &  ByteImg,
BYTE  BGVal = 0 
)
template<class T>
void DTLib::CImg< T >::f2b ( CImg< BYTE > &  ByteImg,
float  Min,
float  Max,
BYTE  BGVal = 0 
)
template<>
void DTLib::CImg< float >::f2b ( CImg< BYTE > &  ByteImg,
BYTE  BGVal 
)
inline
template<>
void DTLib::CImg< float >::f2b ( CImg< BYTE > &  ByteImg,
float  Min,
float  Max,
BYTE  BGVal 
)
inline
template<class T>
void DTLib::CImg< T >::f2bNoscale ( CImg< BYTE > &  ByteImg,
BYTE  BGVal = 0 
)
template<>
void DTLib::CImg< float >::f2bNoscale ( CImg< BYTE > &  ByteImg,
BYTE  BGVal 
)
inline
template<class T>
void DTLib::CImg< T >::FixThetaRanges ( const bool &  bHalfPhase = true)
template<>
void DTLib::CImg< float >::FixThetaRanges ( const bool &  bHalfPhase)
inline
template<class T >
void DTLib::CImg< T >::FreeMemory ( )
template<class T >
T DTLib::CImg< T >::GetPix ( const int &  x,
const int &  y 
)
inline
template<class T >
T DTLib::CImg< T >::GetPix ( const int &  i)
inline
template<class T>
void DTLib::CImg< T >::HardAND ( CImg< T > &  Img,
const T &  Val = (T)255 
)
template<class T>
void DTLib::CImg< T >::HardOR ( CImg< T > &  Img,
const T &  Val = (T)255 
)
template<class T>
int DTLib::CImg< T >::Height ( ) const
inline
template<class T>
void DTLib::CImg< T >::i2f ( CImg< float > &  FloatImg,
float  BGVal = 0.0f 
)
template<>
void DTLib::CImg< int >::i2f ( CImg< float > &  FloatImg,
float  BGVal 
)
inline
template<class T>
bool DTLib::CImg< T >::IsEmpty ( )
inline
template<class T>
bool DTLib::CImg< T >::IsNotEmpty ( )
inline
template<class T>
float DTLib::CImg< T >::L2Norm ( )
template<>
float DTLib::CImg< BYTE >::L2Norm ( )
inline
template<>
float DTLib::CImg< float >::L2Norm ( )
inline
template<class T>
void DTLib::CImg< T >::Log ( const float &  z = 0.0f)
template<>
void DTLib::CImg< float >::Log ( const float &  z)
inline
template<class T>
void DTLib::CImg< T >::Maxpix ( int &  x,
int &  y,
T &  Val 
)
template<class T>
void DTLib::CImg< T >::Maxpix ( T &  Val)
template<class T>
float DTLib::CImg< T >::MeanLuminance ( )
template<>
float DTLib::CImg< BYTE >::MeanLuminance ( )
inline
template<>
float DTLib::CImg< float >::MeanLuminance ( )
inline
template<class T>
void DTLib::CImg< T >::MinMax ( T &  Min,
T &  Max 
)
template<class T>
void DTLib::CImg< T >::Minpix ( int &  x,
int &  y,
T &  Val 
)
template<class T >
void DTLib::CImg< T >::MuFilter ( CImg< float > &  MuImg,
CImg< float > &  TImg,
int  dx,
int  dy 
)
template<class T >
void DTLib::CImg< T >::MuFilter ( CImg< float > &  MuImg,
int  dx,
int  dy 
)
template<class T>
void DTLib::CImg< T >::Mul ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::Mul ( const T &  Val)
template<class T>
void DTLib::CImg< T >::MuSig ( float &  mu,
float &  sig 
)
template<>
void DTLib::CImg< BYTE >::MuSig ( float &  mu,
float &  sig 
)
inline
template<>
void DTLib::CImg< float >::MuSig ( float &  mu,
float &  sig 
)
inline
template<class T >
void DTLib::CImg< T >::MuSigFilter ( CImg< float > &  MuImg,
CImg< float > &  SigImg,
CImg< float > &  TImg,
CImg< float > &  UImg,
int  dx,
int  dy 
)
inline
template<class T >
void DTLib::CImg< T >::MuSigFilter ( CImg< float > &  MuImg,
CImg< float > &  SigImg,
int  dx,
int  dy 
)
template<class T >
void DTLib::CImg< T >::Neg ( )
template<>
void DTLib::CImg< BYTE >::Neg ( )
inline
template<class T >
kjb_int32 DTLib::CImg< T >::nNonZeros ( )
template<class T>
void DTLib::CImg< T >::Normalize ( bool  full_range = false)
template<>
void DTLib::CImg< float >::Normalize ( bool  full_range)
inline
template<>
void DTLib::CImg< BYTE >::Normalize ( bool  full_range)
inline
template<class T>
void DTLib::CImg< T >::NormalizeL1 ( )
template<>
void DTLib::CImg< float >::NormalizeL1 ( )
inline
template<class T>
int DTLib::CImg< T >::nPixels ( ) const
inline
template<class T >
void DTLib::CImg< T >::OutPadROI ( const int &  Padding)
inline
template<class T>
void DTLib::CImg< T >::Pad ( CImg< T > &  DestImg,
const int  Left,
const int  Top,
const T &  Val = (T)0 
)
template<class T>
T* DTLib::CImg< T >::pBuffer ( )
inline
template<class T>
T* DTLib::CImg< T >::pROI ( )
inline
template<class T >
bool DTLib::CImg< T >::ReadRaw ( const char *  strFilename)
template<class T >
void DTLib::CImg< T >::ReduceROI ( int  N = 1)
template<class T >
void DTLib::CImg< T >::ReduceSize ( const int &  NewWidth,
const int &  NewHeight 
)
template<class T >
void DTLib::CImg< T >::ReflectToROI ( )
template<class T >
void DTLib::CImg< T >::Report ( )
inline
template<class T >
void DTLib::CImg< T >::ReportMinMax ( )
template<class T>
int DTLib::CImg< T >::ROIEndX ( )
inline
template<class T>
int DTLib::CImg< T >::ROIEndY ( )
inline
template<class T>
int DTLib::CImg< T >::ROIHeight ( )
inline
template<class T>
int DTLib::CImg< T >::ROIOffset ( )
inline
template<class T>
int DTLib::CImg< T >::ROISize ( )
inline
template<class T>
int DTLib::CImg< T >::ROISkipCols ( )
inline
template<class T>
int DTLib::CImg< T >::ROIStartX ( )
inline
template<class T>
int DTLib::CImg< T >::ROIStartY ( )
inline
template<class T>
int DTLib::CImg< T >::ROIWidth ( )
inline
template<class T >
void DTLib::CImg< T >::SafeChangeROI ( const int  StartX,
const int  EndX,
const int  StartY,
const int  EndY 
)
template<class T>
void DTLib::CImg< T >::Set_pBuffer ( const T *  pBuf,
const int  Width,
const int  Height,
const bool  bCopy = false 
)

IMPLEMENTATION.

template<class T>
void DTLib::CImg< T >::SetOutROIVal ( const T &  Val)
template<class T>
void DTLib::CImg< T >::SetOutROIVal ( const T &  TopVal,
const T &  BotVal,
const T &  LeftVal,
const T &  RightVal 
)
template<class T>
void DTLib::CImg< T >::SetPix ( const int &  x,
const int &  y,
const T &  Val 
)
inline
template<class T>
void DTLib::CImg< T >::SetPix ( const int &  i,
const T &  Val 
)
inline
template<class T>
void DTLib::CImg< T >::SetROIVal ( const T &  Val)
template<class T>
void DTLib::CImg< T >::SoftAND ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::SoftOR ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::Sqrt ( )
template<>
void DTLib::CImg< float >::Sqrt ( )
inline
template<class T>
void DTLib::CImg< T >::Square ( )
template<>
void DTLib::CImg< float >::Square ( )
inline
template<class T>
void DTLib::CImg< T >::Sub ( CImg< T > &  Img)
template<class T>
void DTLib::CImg< T >::Sub ( const T &  Val)
template<class T>
float DTLib::CImg< T >::SumAbs ( )
template<>
float DTLib::CImg< BYTE >::SumAbs ( )
inline
template<>
float DTLib::CImg< float >::SumAbs ( )
inline
template<class T>
void DTLib::CImg< T >::SwapAll ( CImg< T > &  InImg)
template<class T>
void DTLib::CImg< T >::SwapPointers ( CImg< T > &  InImg)
template<class T >
void DTLib::CImg< T >::ToFloat ( CImg< float > &  FloatImg,
float  BGVal = 0.0f 
)
template<class T>
void DTLib::CImg< T >::Val2Probability ( const float &  Sigma)
template<>
void DTLib::CImg< float >::Val2Probability ( const float &  Sigma)
inline
template<class T>
int DTLib::CImg< T >::Width ( ) const
inline
template<class T >
bool DTLib::CImg< T >::WriteRaw ( const char *  strFilename)
template<class T >
void DTLib::CImg< T >::Zero ( )

Member Data Documentation

template<class T>
bool DTLib::CImg< T >::m_bDelete
protected
template<class T>
int DTLib::CImg< T >::m_Height
protected
template<class T>
int DTLib::CImg< T >::m_nPixels
protected
template<class T>
T* DTLib::CImg< T >::m_pBuffer
protected
template<class T>
T* DTLib::CImg< T >::m_pROI
protected
template<class T>
int DTLib::CImg< T >::m_ROIEndX
protected
template<class T>
int DTLib::CImg< T >::m_ROIEndY
protected
template<class T>
int DTLib::CImg< T >::m_ROIHeight
protected
template<class T>
int DTLib::CImg< T >::m_ROIOffset
protected
template<class T>
int DTLib::CImg< T >::m_ROISize
protected
template<class T>
int DTLib::CImg< T >::m_ROISkipCols
protected
template<class T>
int DTLib::CImg< T >::m_ROIStartX
protected
template<class T>
int DTLib::CImg< T >::m_ROIStartY
protected
template<class T>
int DTLib::CImg< T >::m_ROIWidth
protected
template<class T>
int DTLib::CImg< T >::m_Width
protected

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