Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BIAS::WrapBias2Ipl Class Reference

wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area. More...

#include <Base/Image/WrapBias2Ipl.hh>

+ Collaboration diagram for BIAS::WrapBias2Ipl:

Public Member Functions

int Bind (const BIAS::ImageBase *p_src)
 create the internal IPL image which shares the data area with the src Bias image. More...
 
bool Consistent () const
 
int Display (const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale) const
 Display img as simple popup window. More...
 
int Display (const char *DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale, const bool &allowAlphaWindow=ALLOW_ALPHA_WIN_DEFAULT) const
 
int Display (const std::string &DestWin, const bool &autoresize=true, const bool &moveToTopLeft=true, const bool &waitForKey=false, const unsigned int &delayMsec=0, const float &scale=DEFAULT_32to8_scale, const bool &allowAlphaWindow=ALLOW_ALPHA_WIN_DEFAULT) const
 Display img as simple popup HighGUI window. More...
 
 WrapBias2Ipl ()
 
 WrapBias2Ipl (const BIAS::ImageBase *PtrImgBias)
 
 ~WrapBias2Ipl ()
 

Static Public Member Functions

static void ConvertIPL32to8 (const IplImage *src32, IplImage *dest8, const float &scale=DEFAULT_32to8_scale)
 
32 bit float to displayable 8 bit conversion

Both images should be pre-initilaized to equal size and correct storage type. More...

 
static int CreateBiasImageCopy (const IplImage *p_src, BIAS::ImageBase &dest)
 
helper function to create a copy (!) BIAS image from a master Ipl image 

Data area is NOT shared but copied from ipl to bias. More...

 
static int CreateIplImageShared (const BIAS::ImageBase *p_src, IplImage *&p_dest)
 helper function to create a slave ipl image which shares the data area with the master ref. More...
 
static void DestroyAllWindows ()
 wrapper for CV destroiing all HighGUI windows JW More...
 
static void DestroyWindow (const char *name)
 
static void DestroyWindow (const std::string &name)
 
static int Display (const IplImage *img, const std::string &DestWin, const bool &autoresize, const bool &moveToTopLeft, const bool &waitForKey, const unsigned int &delayMsec, const float &scale=DEFAULT_32to8_scale, const bool &allowAlphaWindow=ALLOW_ALPHA_WIN_DEFAULT)
 Display img as simple popup window. More...
 
static void MoveWindow (const char *name, const int newX, const int newY)
 
static void MoveWindow (const std::string &name, const int newX, const int newY)
 
static void NamedWindow (const char *name, const int flags=1)
 
static void NamedWindow (const std::string &name, const int flags=1)
 
static void ResizeWindow (const char *name, const unsigned int width, const unsigned int height)
 
static void ResizeWindow (const std::string &name, const unsigned int width, const unsigned int height)
 
static int WaitKey (const unsigned int &delay=0)
 wrapper for cvWaitKey More...
 

Public Attributes

const BIAS::ImageBasep_imgBias
 
IplImage * p_imgIpl
 
bool p_imgIplDestroyable
 

Detailed Description

wrapper around a BIAS image to be used as an OpenCv IPlimage with shared data area.

Author
Jan Woetzel 07/2005
Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 26 of file WrapBias2Ipl.hh.

Constructor & Destructor Documentation

WrapBias2Ipl::~WrapBias2Ipl ( )

Definition at line 22 of file WrapBias2Ipl.cpp.

WrapBias2Ipl::WrapBias2Ipl ( )

Definition at line 34 of file WrapBias2Ipl.cpp.

WrapBias2Ipl::WrapBias2Ipl ( const BIAS::ImageBase PtrImgBias)

Definition at line 44 of file WrapBias2Ipl.cpp.

References Bind(), and p_imgIplDestroyable.

Member Function Documentation

int WrapBias2Ipl::Bind ( const BIAS::ImageBase p_src)

create the internal IPL image which shares the data area with the src Bias image.

And save the pointer to this source BIAS img.

Returns
0 for succes, other=error
Author
Jan Woetzel 07/2005

Definition at line 63 of file WrapBias2Ipl.cpp.

References CreateIplImageShared(), p_imgBias, and p_imgIpl.

Referenced by BIAS::ImageDraw< StorageType >::Text(), and WrapBias2Ipl().

bool WrapBias2Ipl::Consistent ( ) const
Returns
false if the wrapped images are inconsistent JW

Definition at line 301 of file WrapBias2Ipl.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetImageData(), BIAS::ImageBase::GetWidth(), p_imgBias, and p_imgIpl.

void WrapBias2Ipl::ConvertIPL32to8 ( const IplImage *  src32,
IplImage *  dest8,
const float &  scale = DEFAULT_32to8_scale 
)
static

32 bit float to displayable 8 bit conversion

Both images should be pre-initilaized to equal size and correct storage type.

Parameters
scalemapping function, e.g. 255 for 0..1 –> 0..255
Author
Jan Woetzel

Definition at line 320 of file WrapBias2Ipl.cpp.

Referenced by Display().

int WrapBias2Ipl::CreateBiasImageCopy ( const IplImage *  p_src,
BIAS::ImageBase dest 
)
static
int WrapBias2Ipl::CreateIplImageShared ( const BIAS::ImageBase p_src,
IplImage *&  p_dest 
)
static
void WrapBias2Ipl::DestroyAllWindows ( )
static

wrapper for CV destroiing all HighGUI windows JW

Definition at line 534 of file WrapBias2Ipl.cpp.

void WrapBias2Ipl::DestroyWindow ( const char *  name)
static

Definition at line 539 of file WrapBias2Ipl.cpp.

Referenced by DestroyWindow().

void WrapBias2Ipl::DestroyWindow ( const std::string &  name)
static

Definition at line 544 of file WrapBias2Ipl.cpp.

References DestroyWindow().

int WrapBias2Ipl::Display ( const IplImage *  img,
const std::string &  DestWin,
const bool &  autoresize,
const bool &  moveToTopLeft,
const bool &  waitForKey,
const unsigned int &  delayMsec,
const float &  scale = DEFAULT_32to8_scale,
const bool &  allowAlphaWindow = ALLOW_ALPHA_WIN_DEFAULT 
)
static

Display img as simple popup window.

Parameters
waitForKeyif true delaMsec is waited for keypres. 0=forever.
delayMsecif waitForKey is true wait for key with 0=forever, see cvWaitkey.
Returns
pressed key (if any)
Author
JW 2005 TODO: add interface this in BIAS/Gui as GuiCV with static functions including sliders, mouse motion etc. (jw)
Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 405 of file WrapBias2Ipl.cpp.

References ConvertIPL32to8(), and WaitKey().

Referenced by Display(), and BIAS::ImageBase::Display().

int WrapBias2Ipl::Display ( const bool &  waitForKey = false,
const unsigned int &  delayMsec = 0,
const float &  scale = DEFAULT_32to8_scale 
) const

Display img as simple popup window.

If you experience color channel Seq. problems, use highgui with by RGB/BGR fix(jw)

Parameters
delayMsec,:
Returns
pressed key (if any)
Author
JW

Definition at line 361 of file WrapBias2Ipl.cpp.

References Display().

int WrapBias2Ipl::Display ( const char *  DestWin,
const bool &  autoresize = true,
const bool &  moveToTopLeft = true,
const bool &  waitForKey = false,
const unsigned int &  delayMsec = 0,
const float &  scale = DEFAULT_32to8_scale,
const bool &  allowAlphaWindow = ALLOW_ALPHA_WIN_DEFAULT 
) const

Definition at line 369 of file WrapBias2Ipl.cpp.

References Display().

int WrapBias2Ipl::Display ( const std::string &  DestWin,
const bool &  autoresize = true,
const bool &  moveToTopLeft = true,
const bool &  waitForKey = false,
const unsigned int &  delayMsec = 0,
const float &  scale = DEFAULT_32to8_scale,
const bool &  allowAlphaWindow = ALLOW_ALPHA_WIN_DEFAULT 
) const

Display img as simple popup HighGUI window.

Parameters
actuallyscale is used only for float to 8 Byte range conversion
Returns
pressed key (if any)
Author
Jan Woetzel 2005

Definition at line 390 of file WrapBias2Ipl.cpp.

References Display(), and p_imgIpl.

void WrapBias2Ipl::MoveWindow ( const char *  name,
const int  newX,
const int  newY 
)
static

Definition at line 565 of file WrapBias2Ipl.cpp.

Referenced by MoveWindow().

void WrapBias2Ipl::MoveWindow ( const std::string &  name,
const int  newX,
const int  newY 
)
static

Definition at line 570 of file WrapBias2Ipl.cpp.

References MoveWindow().

void WrapBias2Ipl::NamedWindow ( const char *  name,
const int  flags = 1 
)
static

Definition at line 576 of file WrapBias2Ipl.cpp.

void WrapBias2Ipl::NamedWindow ( const std::string &  name,
const int  flags = 1 
)
static

Definition at line 581 of file WrapBias2Ipl.cpp.

void WrapBias2Ipl::ResizeWindow ( const char *  name,
const unsigned int  width,
const unsigned int  height 
)
static

Definition at line 550 of file WrapBias2Ipl.cpp.

Referenced by ResizeWindow().

void WrapBias2Ipl::ResizeWindow ( const std::string &  name,
const unsigned int  width,
const unsigned int  height 
)
static

Definition at line 557 of file WrapBias2Ipl.cpp.

References ResizeWindow().

int WrapBias2Ipl::WaitKey ( const unsigned int &  delay = 0)
static

wrapper for cvWaitKey

Returns
pressed key (if any) JW 2005

Definition at line 356 of file WrapBias2Ipl.cpp.

Referenced by Display().

Member Data Documentation

const BIAS::ImageBase* BIAS::WrapBias2Ipl::p_imgBias
Examples:
ExampleIplWrapOpenCV.cpp.

Definition at line 141 of file WrapBias2Ipl.hh.

Referenced by Bind(), and Consistent().

IplImage* BIAS::WrapBias2Ipl::p_imgIpl
bool BIAS::WrapBias2Ipl::p_imgIplDestroyable

Definition at line 145 of file WrapBias2Ipl.hh.

Referenced by WrapBias2Ipl().


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