Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PAC Namespace Reference


Detailed Description

image drawing functions ImageDC.cpp

Author:
Oliver Granert


Classes

class  CPACClassDatabase
 Database class that takes care of objects and their interfaces. More...
struct  SClassData
class  CPACClassRepository
 This is the base class for all class repositories. More...
class  CPACdmsError
 DMS Error Class. More...
class  CPACDynamicModuleService
 This class implements the dynamic module service. More...
class  CPACModuleAccess
 This is the base class for operating system independant module access. More...
class  CPACObjectFactory
 This is the base class for the creation and destruction of objects. More...
class  CColorModelBase
class  CImage
 PACLib base class for all types of images. More...
class  CImageBase
 PACLib base class for all types of images. More...
struct  SRGB_PIXEL
 structure for RGB pixels More...
struct  SBGR_PIXEL
 structure for BGR pixels More...
struct  SHSV_PIXEL
 structure for HSV pixels More...
class  ImageDC
 The class ImageDC encapsulates image drawing with clipping. More...
class  CImageList
 PACLib class for a list of images. More...
class  CColorModel_GRAY
class  CColorModel_RGB
class  CColorModel_BGR
class  CColorModel_HSI
class  CColorModel_HSV
class  CColorModel_GRADIENT
class  CPACImageAcquire
 This class provides OS and device independent access to video devices, such as frame grabbers and scanners. More...
class  CPACImageConvert
class  CPACImageDisplay
 This class encapsulates use of the image display. More...
class  CPACImageFile
 This class encapsulates reading and writing of image files using dynamic module services . More...
struct  IGLUTMainLoopElement
struct  IGTKMainLoopElement
struct  IActivity
 Interface for activities. More...
struct  ICLUScriptParserEx
 Interface for a CLUScript Parser Extension. More...
struct  ICLUScriptParser
 Interface for a CLUScript Parser. More...
struct  IDisplayImage
 Interface to a window. More...
struct  IDisplayModules
 Interface to a module window. More...
struct  IDisplayOptions
 IDisplayOptions. More...
struct  IDisplayWindow
 Interface to a window. More...
struct  IPACDynamicObject
 Interface for Dynamic Objects. More...
struct  IPACDynamicModuleService
 Interface to Dynamic Module Service class. More...
struct  FEATUREPOINT
 Auxiliary structure to define a feature point. More...
struct  IFeatureDetector
 Interface for applying a general filter. More...
struct  IFile
 Interface (Set/Get file name for future I/O operations through other interfaces). More...
class  CFileInfo
 Extended Interface Information for IFile. More...
struct  IFileSelector
 Interface to a file selector. More...
struct  IFilter
 Interface for applying a general filter. More...
struct  IImageAcquire
struct  IImageConverter
struct  IImageDataBaseTrainer
 ImageDataBaseTrainer interface. More...
struct  IImageSource
 Interface for getting an image. More...
struct  IImageTarget
 Image Target interface. More...
struct  IMainLoop
 Interface for a main loop. More...
struct  IMutex
 Mutex Interface. More...
struct  IObjectEnvironment
 Interface to work with dynamic objects with name. More...
struct  IObject
 Interface for objects which can be added to a class with an IObjectEnvironment interface. More...
struct  IOptions
 Interface for get/set options. More...
struct  IOptionsTarget
struct  IRunnable
class  CArrayBase
 The base class for PACLib images and other data classes. More...
class  CChannel
 This class implements the observer design pattern. More...
class  CObserver
 Base class for objects which could be registered at a CChannel object. More...
class  CPACDataWrapper
 This class creates, destroys and accesses protable data. More...
class  CPACDirectory
 Class to deal with reading directories. More...
class  CPACDirectoryUnix
 Implementation of CPACDirectory class for Unix. More...
class  CPACDirectoryWin32
 Implementation of CPACDirectory class for Windows. More...
class  CPACException
 Fundamental Exception Class for PAC Library. More...
class  CPACFatalError
 Fundamental Exception Class for fatal errors. More...
class  CPACAssertion
 Fundamental Exception Class for assertions. More...
class  CPACError
 Fundamental Exception Class for normal errors. More...
class  CPACWarning
 Fundamental Exception Class for warnings. More...
class  CPACOutOfMemory
 Fundamental Exception Class for out of memory errors. More...
class  CPACOutOfRange
 Fundamental Exception Class for out of memory errors. More...
class  CIfcWrapper
 Template class to wrap the dynamic creation of objects, identified by a set of interfaces. More...
struct  IInterfaceDescriptor
 Interface Descriptor. More...
class  CPACInterfaceInfo
 Class containing Info on an Interface. More...
class  COptionConstraint
 base class for option constraint types More...
class  CPAC_Constant
 option constraints constant (not editable) More...
class  CPAC_DynObject
 option constraints dynamic object More...
class  CPAC_Range
 option constraint RANGE: More...
class  CPAC_List
 option constraint LIST: More...
class  CPAC_StringFilename
 option constraints filename More...
class  COptionInfo
 This class is used to transmit informations about a specific option. More...
class  CPACParseCmdLine
 Class to parse command line. More...
class  CPACStdObjectEnvironment
class  CPACStdOptions
 Implements the mapping between option names and numbers to simplify IOption interface support. More...
class  CPACThread
 Class to deal with multithreading. More...
struct  SUniqueID
 Unique ID structure. More...
class  CPACuuid
 Basis class for unique identifier generators. Use the typedef TPACuuidClass for a concrete implementation. More...
class  CPACuuidUnix
class  CPACuuidWin32
class  CSimpleOptions
class  CStorageType
class  CStorageTypeBase
class  CMAES
 Non-linear optimization method using the CMAES (Completely Derandomized Self-Adaptation in Evolutions strategy) algorithm. More...
class  CMatrix
 The PACLib matrix class is a two dimensional array for mathematical computations. More...
class  CVector
 The PACLib vector class is a one dimensional array for mathematical computations. More...
class  CImageConverter
 This class wraps the loading and use of image converters. More...
class  CImageFilter
 This class wraps the loading and use of image filters. More...
class  CImageFilterList
 This class organizes a list of CImageFilter instances. More...
class  CLatexReport
 Creates a simple Latex report. It is able to handle text and epsfigs. More...
class  COptionsIfcWrapper
 This class wraps the functions that can be called on an options interface. More...
class  CPACApplication
class  CStdImageConverter
 A standard converter class from which you can derive specialized converters. More...
class  CStdImageFilter
 A standard filter class from which you can derive specialized filters. More...
class  CWidgetFactory
 A widget factory class. This class can be used to create widgets depeding on the running main loop type. More...
class  CXMLdom
class  CXMLElement
class  CXMLTree
class  CImageDataBase
 The class can handel an ImageDataBase XML file. More...
class  CImageDBRobotStatus
 This class is useful to store position information of a robot in an ImageDataBase XML file. More...
class  CImageDBAffineTransformation
 This class is useful to store affine transformation information in an ImageDataBase XML file. More...
class  CImageDBImage
 This class is useful to store image information in an ImageDataBase XML file. More...
class  CImageDBObject
 This class is useful to store object information in an ImageDataBase XML file. More...
class  CProcessingXML
 Class to read/write a graph of dynamic objects. This class provides the XML layer for the CProcessingGraphBase class. More...
class  CProcessingGraphBase
 Class to read/write and process a graph of dynamic objects. More...
class  CProcessingGraph
 Class to read/write and process a graph of dynamic objects. More...
class  CXMLFilter
struct  ITurntable
struct  ISpringSupportedTable
class  CPACpvm
class  Ccolour_calibration
struct  IcolourCalibration
class  CHistogram

Namespaces

namespace  Signals
 Signals and callbacks.

Typedefs

typedef vector< SClassData > TClassDataList
typedef CIfcWrapper< IDisplayWindow,
IImageTarget
TImageWindow
typedef std::map< CImageBase *,
TImageWindow * >::iterator 
TWindowIterator
typedef CIfcWrapper< IMainLoopTMainLoopWrapper
typedef vector< TInterfaceInfo * > TInterfaceInfoList
typedef unsigned char TUUID [16]
typedef complex< double > complex_double
typedef vector< CImageDBObjectTImageDBObjectList
 A list of XML items representing objects.
typedef vector< CImageDBObjectTObjectList
 Synonym with TObjectList. Deprecated.
typedef vector< CImageDBImageTImageDBImageList
 A list of XML items representing images.
typedef vector< CImageDBImageTDBImageList

Enumerations

enum  TIMAGEFILE_MODE { PAC_FILEREAD, PAC_FILEWRITE }
enum  TIMAGEFILE_STATUS { IMAGEFILE_OK = 0, IMAGEFILE_NOOBJECTFOUND = 1, IMAGEFILE_ERRORNOEXTENSION = 2, IMAGEFILE_ERRORLOADINGFILE = 3 }
enum  TPAC_SETOPTIONINFO { PAC_OPTION_SET = 0, PAC_OPTION_NOTSET, PAC_OPTION_RELOAD }
 Return values for info parameter in method IOptions::SetOptionValue. More...
enum  TPAC_Option_Constraint {
  PAC_CONSTRAINT_NONE = 0, PAC_CONSTRAINT_INT_RANGE, PAC_CONSTRAINT_FLOAT_RANGE, PAC_CONSTRAINT_DOUBLE_RANGE,
  PAC_CONSTRAINT_INT_LIST, PAC_CONSTRAINT_FLOAT_LIST, PAC_CONSTRAINT_DOUBLE_LIST, PAC_CONSTRAINT_STRING_LIST,
  PAC_CONSTRAINT_CONSTANT, PAC_CONSTRAINT_DYNOBJECT, PAC_CONSTRAINT_STRING_FILENAME
}
 enum of option constraint type identifiers More...
enum  TPAC_PD {
  PAC_PDT_UNKNOWN = 0x0000, PAC_PDT_STRUCT = 0x0001, PAC_PDT_CHAR = 0x0002, PAC_PDT_SHORT = 0x0003,
  PAC_PDT_INT = 0x0004, PAC_PDT_FLOAT = 0x0005, PAC_PDT_DOUBLE = 0x0006, PAC_PDT_UID = 0x0010,
  PAC_PDT_BOOL, PAC_PDT_POINTER, PAC_PDT_BUTTON, PAC_PDT_GROUP,
  PAC_PDT_INT_VEC, PAC_PDT_FLOAT_VEC, PAC_PDT_DOUBLE_VEC, PAC_PDT_PIMAGE,
  PAC_PDT_PCHANNEL
}
 Portable Data Types. More...

Functions

template<class PixelType, class ResultType>
ResultType PixelValueSum (const CImageBase &imgA)
 calculate sum over all pixels
template<class PixelType>
PixelType PixelValueMax (const CImageBase &imgA)
 search for the MAX value
template<class PixelType>
PixelType PixelValueMin (const CImageBase &imgA)
 search for the MIN value
template<class PixelType, class CalcType>
void Convolution (const CImageBase &imgS, CImageBase &imgT, const CImageBase &Mask)
 convolve an image with a 2D mask
template<class PixelType, class CalcType>
bool Convolution1Point (const CImageBase &imgS, CalcType &Result, const CImageBase &Mask, int iX, int iY)
 convolve a single point of an image with a 2D mask
template<class PixelType, class CalcType>
void ConvolutionX (const CImageBase &imgS, CImageBase &imgT, const CImageBase &Mask)
 convolve an image with a 1D mask (X/horizontal)
template<class PixelType, class CalcType>
void ConvolutionY (const CImageBase &imgS, CImageBase &imgT, const CImageBase &Mask)
 convolve an image with a 1D mask (Y/vertical)
template<class PixelType>
void CreatePrintableMask (const CImageBase &maskIN, CImageBase &maskOUT, int iScale=5, int iSpace=1, uchar ucGridValue=127)
 generate a printable version (uchar gray scale image) from a filter mask
template<class PixelType>
void MixImage (CImageBase &Source1, CImageBase &Source2, CImageBase &Result)
 Mix or combine two images. The result is an image a "mean" image.
template<class PixelType>
void CutSubImage (CImageBase &Source, CImageBase &Target, int iWidth, int iHeight, int iX, int iY)
 Cuts a subimage. (not tested !!!).
template<class PixelType>
void RescalePixelValues (CImageBase &Source, CImageBase &Target, double dFactor)
 rescales the intensity values
template<class PixelType>
int DetectLocalMax (std::vector< FEATUREPOINT > &vecFeaturePoints, CImageBase &imgS, PixelType fThres, int iVicinity=1, int iBorderWidth=0)
 Finds local maxima in an image.
template<class PixelType>
int DetectLocalMaxSubpix (std::vector< FEATUREPOINT > &vecSubPix, CImageBase &Source, PixelType Threshold, int iVicinity=1, int iBorderWidth=0)
 Finds local maxima in an image with subpixel accuray.
template<class TYPE>
void DownsampleGray (CImageBase &rImage, CImageBase &rResult)
 Resample gray image with factor 2.
static void ThresholdRGBImage (const CImageBase &Source, CImageBase &Result, const uchar Threshold)
 Threshold an RGB image to a (binary) grey level image.
static void ThresholdImage (const CImageBase &Source, CImageBase &Result, const uchar Threshold)
 Threshold a grey or RGB image to a (binary) grey level image.
 PAC_IMPLEMENT_UID (IGLUTMainLoopElement, 0x79, 0x7b, 0x8e, 0x14, 0x5c, 0x79, 0x49, 0xe7, 0xbd, 0x1b, 0x6e, 0x35, 0xe8, 0x4a, 0x2b, 0x6f)
 To implement the UID { 797b8e14-5c79-49e7-bd1b6e35e84a2b6f } write:.
 PAC_IMPLEMENT_UID (IGTKMainLoopElement, 0x77, 0x0b, 0x20, 0xf7, 0x82, 0x77, 0x4a, 0xd4, 0x9e, 0x26, 0x64, 0x6b, 0xc5, 0xe6, 0x12, 0x64)
 To implement the UID { 770b20f7-8277-4ad4-9e26646bc5e61264 } write:.
 PAC_IMPLEMENT_UID (IActivity, 0x37, 0x86, 0x45, 0xaa, 0xb0, 0x04, 0x4a, 0x4a, 0xbc, 0x8d, 0x04, 0x96, 0x5f, 0x27, 0x7b, 0x6a)
 To implement the UID { 378645aa-b004-4a4a-bc8d04965f277b6a } write:.
 PAC_IMPLEMENT_UID (ICLUScriptParserEx, 0x0a, 0xfb, 0xbb, 0x53, 0xa9, 0x0a, 0x43, 0x78, 0xbd, 0xe3, 0x47, 0x53, 0xe2, 0xb9, 0xcc, 0x7f)
 To implement the UID { 0afbbb53-a90a-4378-bde34753e2b9cc7f } write:.
 PAC_IMPLEMENT_UID (ICLUScriptParser, 0x40, 0x8f, 0x77, 0xc1, 0x3a, 0xae, 0x4e, 0x40, 0xaa, 0xdf, 0x99, 0xbc, 0xd8, 0xfa, 0x7f, 0x5c)
 To implement the UID { 408f77c1-3aae-4e40-aadf99bcd8fa7f5c } write:.
 PAC_IMPLEMENT_UID (IDisplayImage, 0x0e, 0x61, 0x41, 0x7d, 0x23, 0x55, 0x48, 0x49, 0xae, 0x6f, 0xd2, 0xc1, 0xc6, 0xeb, 0xce, 0xce)
 To implement the UID { 0e61417d-2355-4849-ae6fd2c1c6ebcece } write:.
 PAC_IMPLEMENT_UID (IDisplayModules, 0x13, 0x88, 0x50, 0xa4, 0x29, 0x88, 0x4e, 0xfc, 0x92, 0x4b, 0x1e, 0x11, 0x90, 0x48, 0x6b, 0xac)
 To implement the UID { 138850a4-2988-4efc-924b1e1190486bac } write:.
 PAC_IMPLEMENT_UID (IDisplayOptions, 0xbe, 0xcb, 0x27, 0x2b, 0x42, 0x92, 0x4f, 0xcd, 0xaf, 0xab, 0x65, 0xf3, 0x6e, 0x61, 0x73, 0x80)
 To implement the UID { becb272b-4292-4fcd-afab65f36e617380 } write:.
 PAC_IMPLEMENT_UID (IDisplayWindow, 0xc2, 0x9f, 0x12, 0xb2, 0x3b, 0x49, 0x48, 0x01, 0xb1, 0x91, 0x42, 0xde, 0x31, 0x9b, 0x44, 0x78)
 To implement the UID { c29f12b2-3b49-4801-b19142de319b4478 } write:.
 PAC_IMPLEMENT_UID (IPACDynamicObject, 0x09, 0xf5, 0xa2, 0xac, 0xd3, 0x7c, 0x4d, 0x46, 0xbf, 0x86, 0x5d, 0xae, 0x20, 0xa8, 0x4b, 0x5f)
 PAC_IMPLEMENT_UID (IFeatureDetector, 0x76, 0xb7, 0x17, 0xb0, 0x6d, 0xef, 0x4e, 0x00, 0x98, 0x37, 0x5a, 0xe8, 0xd0, 0x59, 0x28, 0xff)
 To implement the UID { 76b717b0-6def-4e00-98375ae8d05928ff } write:.
 PAC_IMPLEMENT_UID (IFile, 0x3b, 0xd4, 0x24, 0x32, 0xf9, 0xde, 0x4d, 0x23, 0x8d, 0xa2, 0xee, 0xd4, 0x80, 0x19, 0x90, 0x41)
 PAC_IMPLEMENT_UID (IFileSelector, 0x82, 0x60, 0x8b, 0x03, 0xff, 0x7d, 0x4e, 0x1d, 0x90, 0xf1, 0x36, 0xe4, 0x87, 0xcc, 0xea, 0x18)
 To implement the UID { 82608b03-ff7d-4e1d-90f136e487ccea18 } write:.
 PAC_IMPLEMENT_UID (IFilter, 0x1a, 0xb4, 0x8f, 0x05, 0x81, 0xa7, 0x42, 0x80, 0xa0, 0x66, 0xff, 0x19, 0x63, 0xab, 0x43, 0x7e)
 To implement the UID { 1ab48f05-81a7-4280-a066ff1963ab437e } write:.
 PAC_IMPLEMENT_UID (IImageAcquire, 0x2e, 0x67, 0xab, 0x27, 0x82, 0x2e, 0x4b, 0x1c, 0x89, 0x8b, 0xa4, 0xdd, 0xe7, 0x1d, 0x81, 0x18)
 To implement the UID { 2e67ab27-822e-4b1c-898ba4dde71d8118 } write:.
 PAC_IMPLEMENT_UID (IImageConverter, 0x59, 0xbc, 0xa1, 0x27, 0xdd, 0x4d, 0x4e, 0x2a, 0xa0, 0x0f, 0xc9, 0x50, 0x17, 0x26, 0x43, 0x44)
 To implement the UID { 59bca127-dd4d-4e2a-a00fc95017264344 } write:.
 PAC_IMPLEMENT_UID (IImageDataBaseTrainer, 0x7c, 0x21, 0xf4, 0x33, 0x15, 0x30, 0x49, 0x44, 0x8c, 0xf8, 0xfd, 0x88, 0x0a, 0x41, 0x46, 0x74)
 To implement the UID { 7c21f433-1530-4944-8cf8fd880a414674 } write:.
 PAC_IMPLEMENT_UID (IImageSource, 0x52, 0x46, 0x6e, 0x3f, 0x79, 0x25, 0x4b, 0x85, 0xa2, 0xf2, 0x43, 0x12, 0xf2, 0x43, 0xf1, 0x3e)
 To implement the UID { 52466e3f-7925-4b85-a2f24312f243f13e } write:.
 PAC_IMPLEMENT_UID (IImageTarget, 0x83, 0x81, 0xf4, 0xc7, 0xfc, 0x51, 0x49, 0x81, 0x9c, 0x68, 0x60, 0x05, 0x8f, 0xe8, 0x2b, 0x33)
 To implement the UID { 8381f4c7-fc51-4981-9c6860058fe82b33 } write:.
 PAC_IMPLEMENT_UID (IMainLoop, 0xd0, 0x1f, 0xc8, 0x9c, 0xb3, 0xad, 0x44, 0x1d, 0x94, 0x17, 0x90, 0x58, 0x7f, 0x71, 0xb4, 0x06)
 To implement the UID { d01fc89c-b3ad-441d-941790587f71b406 } write:.
 PAC_IMPLEMENT_UID (IMutex, 0x33, 0x06, 0xbf, 0x40, 0xa6, 0x33, 0x41, 0x93, 0xae, 0x55, 0xbd, 0x79, 0xf4, 0xc6, 0x12, 0xe2)
 To implement the UID { 3306bf40-a633-4193-ae55bd79f4c612e2 } write:.
 PAC_IMPLEMENT_UID (IObjectEnvironment, 0xa0, 0xd4, 0x19, 0x4f, 0x3e, 0xb1, 0x4e, 0x27, 0x8b, 0xeb, 0x8a, 0x46, 0xe5, 0xf0, 0x3a, 0xd9)
 To implement the UID { a0d4194f-3eb1-4e27-8beb8a46e5f03ad9 } write:.
 PAC_IMPLEMENT_UID (IObject, 0x29, 0xad, 0x09, 0x46, 0x32, 0x07, 0x41, 0x77, 0x94, 0x40, 0xe8, 0x28, 0x25, 0x71, 0xa4, 0xe6)
 To implement the UID { 29ad0946-3207-4177-9440e8282571a4e6 } write:.
 PAC_IMPLEMENT_UID (IOptions, 0xcd, 0x1d, 0x86, 0x6d, 0x0d, 0x50, 0x4f, 0x24, 0xbc, 0xaa, 0x5c, 0x6b, 0xb6, 0x2f, 0x33, 0x7e)
 To implement the UID { cd1d866d-0d50-4f24-bcaa5c6bb62f337e } write:.
 PAC_IMPLEMENT_UID (IOptionsTarget, 0x9c, 0xc0, 0xa3, 0xbd, 0xdb, 0x6f, 0x44, 0x4e, 0x96, 0x15, 0x09, 0x6a, 0x83, 0xb7, 0xfd, 0x81)
 To implement the UID { 9cc0a3bd-db6f-444e-9615096a83b7fd81 } write:.
 PAC_IMPLEMENT_UID (IRunnable, 0x55, 0xd9, 0xc4, 0x7c, 0x9f, 0x22, 0x4a, 0x31, 0x83, 0x45, 0x9d, 0xfc, 0xbf, 0x51, 0xd0, 0x4c)
 To implement the UID { 55d9c47c-9f22-4a31-83459dfcbf51d04c } write:.
 PAC_IMPLEMENT_ST (char, 0x6d, 0x1e, 0x05, 0xd7, 0x1f, 0x6d, 0x43, 0x46, 0xb8, 0x9b, 0xa5, 0x53, 0xd3, 0x77, 0xa0, 0xb7)
 PAC_IMPLEMENT_ST (uchar, 0x71, 0xd7, 0x8b, 0x44, 0x51, 0x71, 0x49, 0x34, 0xa2, 0xe7, 0xbe, 0xf6, 0xdd, 0x0c, 0xdc, 0xda)
 PAC_IMPLEMENT_ST (int, 0xfb, 0x73, 0x7a, 0xf4, 0x05, 0xfb, 0x46, 0x64, 0x81, 0x96, 0x5e, 0xd5, 0x3b, 0xeb, 0xee, 0x40)
 PAC_IMPLEMENT_ST (unsigned, 0x65, 0x4c, 0xba, 0x21, 0xb9, 0x65, 0x4b, 0xaf, 0x96, 0xe1, 0xd9, 0x0a, 0x26, 0x6f, 0x16, 0x7c)
 PAC_IMPLEMENT_ST (float, 0x52, 0x5d, 0xe6, 0x7f, 0xd0, 0x52, 0x4d, 0x96, 0x90, 0x65, 0x11, 0x7f, 0x1a, 0xbd, 0x9c, 0x2e)
 PAC_IMPLEMENT_ST (double, 0x4f, 0xac, 0x26, 0x6f, 0xa1, 0x4f, 0x4d, 0xd0, 0xa1, 0xc4, 0xe4, 0x1a, 0x64, 0x63, 0xd0, 0x95)
 PAC_IMPLEMENT_ST (complex_double, 0xa7, 0x60, 0x05, 0xef, 0xb9, 0xa7, 0x43, 0xbf, 0xa5, 0x9c, 0xb2, 0x68, 0xfc, 0xd6, 0x8c, 0x53)
template<class Tcomp>
CVector< Tcomp > leastsqrs (CMatrix< Tcomp > &A, CVector< Tcomp > b)
 The call leastsqrs(A, b) returns the vector that best satisfies A x = b in the least-squares sense. The result returned is the vector x which minimizes norm(A x - b, 2).
template<class Tcomp>
bool householder (CMatrix< Tcomp > &A, CVector< Tcomp > &b)
 Generate a upper triangle matrix with good numerical behavior. If you would solve a lin. system Ax=b, the vector b is transformed like the matrix.
template<class Type>
Type SQR (Type a)
template<class Type>
Type FMAX (Type a, Type b)
int IMIN (int a, int b)
template<class Type>
Type SIGN (Type a, Type b)
template<class Type>
Type pythag (Type a, Type b)
template<class Tcomp>
bool SVD (CMatrix< Tcomp > &a, CVector< Tcomp > &w, CMatrix< Tcomp > &v)
 Calculate SVD (Sigular Value Decomposition).
template<class Tcomp>
CMatrix< Tcomp > operator * (const CMatrix< Tcomp > &A, const Tcomp a)
template<class Tcomp>
CMatrix< Tcomp > operator * (const Tcomp a, const CMatrix< Tcomp > &A)
template<class Tcomp>
CMatrix< Tcomp > OuterProduct (const CVector< Tcomp > &A, const CVector< Tcomp > &B)
template<class Tcomp>
CMatrix< Tcomp > operator+ (const CMatrix< Tcomp > &A, const CMatrix< Tcomp > &B)
template<class Tcomp>
CMatrix< Tcomp > triu (const CMatrix< Tcomp > &A, const int k)
template<class Tcomp>
Tcomp trace (const CMatrix< Tcomp > &A)
 Calculate the sum of diagonal elements.
bool Matrix2Rot (CMatrix< double > R, CVector< double > &Axis, double &theta)
 Calculate rotation axis and rotation from a 3x3 orthogonal matrix.
void Matrix2Euler (CMatrix< double > &R, CVector< double > &EulerAngles)
 Finds Euler angles from a 3x3 rotation matrix.
bool LapackEigenSymmetric (CMatrix< double > &A, CVector< double > &W)
 Eigen values and vectors for real symmetric NxN matrix using the lapack routines. After computation A contains the eignen vectors and W contains the eigne values.
bool LapackEigenUnsymmetric (CMatrix< double > &A, CMatrix< double > &VRI, CVector< double > &WR, CVector< double > &WI)
 Eigen values and vectors for real unsymmetric NxN matrix using the lapack routines. After computation A contains the real right eigen vectors.
double max (double a, double b)
double min (double a, double b)
bool LapackSVD (CMatrix< double > &A, CVector< double > &W, CMatrix< double > &V)
 computes the singular value decomposition (SVD) of a real M-by-N matrix A. The SVD is written
bool LapackLinearEquationsSolver (CMatrix< double > &A, CVector< double > &B)
 Lapack linear equations solver. The vector B contains the solution after running the routine. It solves equations of the form AX = B.
bool LapackLinearEquationsSolver (CMatrix< double > &A, CMatrix< double > &B)
 Lapack linear equations solver. The matrix B contains the solution after running the routine. It solves equations of the form AX = B.
bool LapackLinearLeastSquares (CMatrix< double > &A, CVector< double > &B)
 LapackLinearLeastSquares solves a linear least squares using QR or LU factorization.
bool LapackLinearLeastSquares (CMatrix< double > &A, CMatrix< double > &B)
 LapackLinearLeastSquares solves a linear least squares using QR or LU factorization.
template bool householder< float > (CMatrix< float > &A, CVector< float > &b)
template bool householder< double > (CMatrix< double > &A, CVector< double > &b)
template CVector< float > leastsqrs (CMatrix< float > &A, CVector< float > b)
template CVector< double > leastsqrs (CMatrix< double > &A, CVector< double > b)
template bool SVD (CMatrix< double > &a, CVector< double > &w, CMatrix< double > &v)
template bool SVD (CMatrix< float > &a, CVector< float > &w, CMatrix< float > &v)
template CMatrix< double > operator * (const double a, const CMatrix< double > &A)
template CMatrix< double > operator * (const CMatrix< double > &A, const double a)
template CMatrix< double > OuterProduct (const CVector< double > &A, const CVector< double > &B)
template CMatrix< double > operator+ (const CMatrix< double > &A, const CMatrix< double > &B)
template CMatrix< double > triu (const CMatrix< double > &A, const int k)
template<class Tcomp>
CVector< Tcomp > operator * (const Tcomp a, const CVector< Tcomp > &A)
template<class Tcomp>
Tcomp norm (const CVector< Tcomp > &v)
template<class Tcomp>
Tcomp DotProduct (const CVector< Tcomp > &v1, const CVector< Tcomp > &v2)
template CVector< double > operator * (const double a, const CVector< double > &A)
template double DotProduct (const CVector< double > &v1, const CVector< double > &v2)
template double norm (const CVector< double > &v)
 PAC_IMPLEMENT_STD_IINFO (CProcessingGraph, IOptions)
 PAC_IMPLEMENT_STD_IINFO (CProcessingGraph, IObjectEnvironment)
 PAC_INIT_STD_IINFO (IOptions,"CPACApplication","Options interface from class CPACApplication", 0, 1, 0)
 PAC_INIT_STD_IINFO (IObjectEnvironment,"CPACApplication","ObjectEnvironment interface from class CPACApplication", 0, 1, 0)
 PAC_IMPLEMENT_UID (ITurntable, 0xe7, 0xee, 0x0e, 0x20, 0x40, 0xed, 0x49, 0x08, 0xa5, 0x75, 0x19, 0x2e, 0xe6, 0x7d, 0x12, 0x61)
 To implement the UID { e7ee0e20-40ed-4908-a575192ee67d1261 } write:.
 PAC_IMPLEMENT_UID (ISpringSupportedTable, 0x34, 0xf3, 0xd0, 0x33, 0xd3, 0x8f, 0x4a, 0xc9, 0x94, 0x36, 0x72, 0x7c, 0x89, 0xf6, 0xd6, 0x28)
 To implement the UID { 34f3d033-d38f-4ac9-9436727c89f6d628 } write:.
 PAC_IMPLEMENT_UID (IcolourCalibration, 0x7d, 0x70, 0x30, 0x70, 0x07, 0x9c, 0x45, 0xc2, 0xba, 0x28, 0xe7, 0x2b, 0x17, 0xa6, 0x3d, 0x16)
 To implement the UID { 7d703070-079c-45c2-ba28e72b17a63d16 } write:.

Variables

typedef CImageTImagePtr
typedef CImageBaseTImageBasePtr
typedef CImageListTImageListPtr
typedef CPACInterfaceInfo TInterfaceInfo
template CMatrix<double>
template CMatrix<float>
template CMatrix<int>
template CMatrix<char>
typedef vector< CXMLElement > TXMLElementList


Typedef Documentation

typedef vector<TInterfaceInfo*> PAC::TInterfaceInfoList
 

This is the type of the interface info pointer list.

Definition at line 52 of file PACInterfaceInfo.h.


Function Documentation

PAC_IMPLEMENT_ST char  ,
0x6d  ,
0x1e  ,
0x05  ,
0xd7  ,
0x1f  ,
0x6d  ,
0x43  ,
0x46  ,
0xb8  ,
0x9b  ,
0xa5  ,
0x53  ,
0xd3  ,
0x77  ,
0xa0  ,
0xb7 
 

To implement the storage type char with UID { 6d1e05d7-1f6d-4346-b89ba553d377a0b7 } write:

PAC_IMPLEMENT_ST uchar  ,
0x71  ,
0xd7  ,
0x8b  ,
0x44  ,
0x51  ,
0x71  ,
0x49  ,
0x34  ,
0xa2  ,
0xe7  ,
0xbe  ,
0xf6  ,
0xdd  ,
0x0c  ,
0xdc  ,
0xda 
 

To implement the storage type uchar with UID { 71d78b44-5171-4934-a2e7bef6dd0cdcda } write:

PAC_IMPLEMENT_ST int  ,
0xfb  ,
0x73  ,
0x7a  ,
0xf4  ,
0x05  ,
0xfb  ,
0x46  ,
0x64  ,
0x81  ,
0x96  ,
0x5e  ,
0xd5  ,
0x3b  ,
0xeb  ,
0xee  ,
0x40 
 

To implement the storage type int with UID { fb737af4-05fb-4664-81965ed53bebee40 } write:

PAC_IMPLEMENT_ST unsigned  ,
0x65  ,
0x4c  ,
0xba  ,
0x21  ,
0xb9  ,
0x65  ,
0x4b  ,
0xaf  ,
0x96  ,
0xe1  ,
0xd9  ,
0x0a  ,
0x26  ,
0x6f  ,
0x16  ,
0x7c 
 

To implement the storage type unsigned with UID { 654cba21-b965-4baf-96e1d90a266f167c } write:

PAC_IMPLEMENT_ST float  ,
0x52  ,
0x5d  ,
0xe6  ,
0x7f  ,
0xd0  ,
0x52  ,
0x4d  ,
0x96  ,
0x90  ,
0x65  ,
0x11  ,
0x7f  ,
0x1a  ,
0xbd  ,
0x9c  ,
0x2e 
 

To implement the storage type float with UID { 525de67f-d052-4d96-9065117f1abd9c2e } write:

PAC_IMPLEMENT_ST double  ,
0x4f  ,
0xac  ,
0x26  ,
0x6f  ,
0xa1  ,
0x4f  ,
0x4d  ,
0xd0  ,
0xa1  ,
0xc4  ,
0xe4  ,
0x1a  ,
0x64  ,
0x63  ,
0xd0  ,
0x95 
 

To implement the storage type double with UID { 4fac266f-a14f-4dd0-a1c4e41a6463d095 } write:

PAC_IMPLEMENT_ST complex_double  ,
0xa7  ,
0x60  ,
0x05  ,
0xef  ,
0xb9  ,
0xa7  ,
0x43  ,
0xbf  ,
0xa5  ,
0x9c  ,
0xb2  ,
0x68  ,
0xfc  ,
0xd6  ,
0x8c  ,
0x53 
 

To implement the storage type complex_double with UID { a76005ef-b9a7-43bf-a59cb268fcd68c53 } write:

template<class Tcomp>
Tcomp PAC::trace const CMatrix< Tcomp > &  A  ) 
 

Calculate the sum of diagonal elements.

Author:
Oliver Granert

Definition at line 591 of file Matrix.cpp.

Referenced by Matrix2Rot().

00592 {
00593     Tcomp sum=0;
00594     if(A.GetRows()==A.GetCols())
00595     {
00596         for (int i=0; i < A.GetRows(); i++)
00597             sum+=A(i,i);
00598     }
00599     return sum;
00600 }

bool PAC::Matrix2Rot CMatrix< double >  R,
CVector< double > &  Axis,
double &  theta
 

Calculate rotation axis and rotation from a 3x3 orthogonal matrix.

The output is a rotation axis and the rotation angle (in rad). not tested

Definition at line 602 of file Matrix.cpp.

References LapackEigenSymmetric(), PAC::CMatrix< Tcomp >::SetDim(), and trace().

00603 {
00604     double ctheta = (trace(R)-1)/2;
00605     theta = acos(ctheta);
00606     CVector<double> D;
00607     LapackEigenSymmetric(R, D);
00608     Axis.SetDim(3);
00609     for(int i=0;i<3;++i)
00610     {
00611         if (D(i) == 1)
00612         {
00613             for(int j=0;j<3;++j)
00614                 Axis(j) = R(j,i);
00615             break;
00616         }
00617     }
00618     Axis.Normalize();
00619 }

void PAC::Matrix2Euler CMatrix< double > &  R,
CVector< double > &  EulerAngles
 

Finds Euler angles from a 3x3 rotation matrix.

The vector EulerAngles contains: EulerAngles(0) rotation angle around Y axis EulerAngles(1) rotation angle around X axis EulerAngles(2) rotation angle around Z axis

this conversion uses NASA standard aeroplane conventions as described on page: http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm Coordinate System: right hand Positive angle: right hand Order of euler angles: heading first, then attitude, then bank matrix row column ordering: [m00 m01 m02] [m10 m11 m12] [m20 m21 m22] adapted from http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToEuler/

experimental not tested (angles have different signs!)

Definition at line 631 of file Matrix.cpp.

References PAC::CMatrix< Tcomp >::SetDim().

00632 {
00633     EulerAngles.SetDim(3);
00634     // Assuming the angles are in radians.
00635     if (R(1,0) > 0.998) { // singularity at north pole
00636         EulerAngles[0] = atan2(R(0,2),R(2,2));
00637         EulerAngles[1] = M_PI/2.0;
00638         EulerAngles[2] = 0;
00639         return;
00640     }
00641     if (R(1,0) < -0.998) { // singularity at south pole
00642         EulerAngles[0] = atan2(R(0,2),R(2,2));
00643         EulerAngles[1] = -M_PI/2.0;
00644         EulerAngles[2] = 0;
00645         return;
00646     }
00647     EulerAngles[0] = atan2(-R(2,0),R(0,0));
00648     EulerAngles[1] = atan2(-R(1,2),R(1,1));
00649     EulerAngles[2] = asin(R(1,0));
00650 }

template<class Tcomp>
CVector< Tcomp > PAC::operator * const Tcomp  a,
const CVector< Tcomp > &  A
 

FIXME fak template <class tcomp=""> CVector<Tcomp> operator * (Tcomp v){ CVector <tcomp> Result(GetDim()); Tcomp* ptrS1 = (Tcomp*)GetData(); for (int i=0; i < GetDim(); i++){ Result[i] = v * ptrS1[i]; } return Result; }

Definition at line 71 of file Vector.cpp.

00072 {
00073         CVector <Tcomp> Result(A.GetDim());
00074         for (int i=0; i < A.GetDim(); i++){
00075                 Result[i] = a * A[i];
00076         }
00077         return Result;
00078 }

Perception-Action Components Library - PACLib
developed by the Cognitive Systems Group