1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
| /*************************************************************
STEMMER IMAGING GmbH
--------------------------------------------------------------
Filename : icvcimg.h
Date : 12.05.97 15:35:35
Description :
Created by : Martin Kersting
Revision : 1.1
Revision : 2.1 Port for CV by RS
*************************************************************/
#ifdef __cplusplus
#define IMPORT(t) extern "C" t __stdcall
#else
#define IMPORT(t) t __stdcall
#endif
#ifndef CVCIMAGE_INCLUDE
#define CVCIMAGE_INCLUDE
// CVC object types
typedef void *IMG;
typedef void *OBJ;
typedef void *PIXELLIST;
typedef void **PPVOID;
// CVC license info
#define LI_NOLICENSE 0
#define LI_COMMONVISIONBLOX 1
#define LI_CVC 2
#define LI_VISIONBLOX 3
#define LI_MINOS 4
#define LI_HARDWARE 5
// histogramms and normalization
enum TNormalizeMode
{
Normalize_MeanVariance = 0,
Normalize_MinMax = 1
};
typedef char TGray8Table [256];
typedef short TGray16Table[256];
typedef long TGray32Table[256];
typedef double TGray64Table[256];
typedef long THistogram [256];
// Image Scan Callbacks
typedef long ( __stdcall *TFLine) (void * pPrivate, long LinesToDo);
typedef long ( __stdcall *TFPixelUnary) (void * pPrivate, void *pPixel, long x, long y);
typedef long ( __stdcall *TFPixelBinary)(void * pPrivate, void *pPixel1, void *pPixel2, long x, long y);
typedef void ( __stdcall *TFNonlinear) (void * pPrivate, double& X, double& Y);
// transformation matrix
typedef struct
{
double A11;
double A12;
double A21;
double A22;
} TMatrix;
// coordinate system
typedef struct
{
double OrgX;
double OrgY;
TMatrix Matrix;
} TCoordinateMap;
typedef TCoordinateMap *LPCOORDINATEMAP;
// is the equivalent of the Windows TRect with double precision scanlines
typedef struct
{
double Left;
double Top;
double Right;
double Bottom;
} TDRect;
// general area
typedef struct
{
double X0;
double Y0;
double X1;
double Y1;
double X2;
double Y2;
} TArea;
// a single VPA entry
typedef struct tagVPAEntry
{ long XEntry;
long YEntry;
} VPAEntry;
// an array of VPA entries
typedef VPAEntry *PVPAT;
#endif // CVCIMAGE_INCLUDE
IMPORT(long) GetSerialNumber ();
IMPORT(long) GetLicenseInfo ();
IMPORT(double) Argument ( double ADX, double ADY );
IMPORT(void) SetArea ( double X0, double Y0, double X1, double Y1, double X2, double Y2, TArea& Area );
IMPORT(void) SetRectArea ( double L, double T, double R, double B, TArea& Area );
IMPORT(void) SetMatrix ( double B11, double B12, double B21, double B22, TMatrix& M );
IMPORT(double) MatrixDeterminant ( TMatrix M );
IMPORT(bool) InverseMatrix ( TMatrix A, TMatrix& AInv );
IMPORT(void) RotationMatrix ( double Angle, TMatrix& M );
IMPORT(void) MatrixRTransform ( double Xin, double Yin, TMatrix M, double& Xout, double& Yout );
IMPORT(void) MatrixITransform ( long Xin, long Yin, TMatrix M, long& Xout, long& Yout );
IMPORT(void) MatrixTransformArea ( TArea AreaIn, TMatrix Matrix, TArea& AreaOut );
IMPORT(void) CoordinateMapTransform ( double XI, double YI, TCoordinateMap CS, double& XP, double& YP );
IMPORT(void) InitCoordinateMap ( TCoordinateMap& CM );
IMPORT(void) CoordinateMapTransformArea( TArea AreaIn, TCoordinateMap CS, TArea& AreaOut );
IMPORT(void) ComposeCoordinateMaps ( TCoordinateMap CS1, TCoordinateMap CS2, TCoordinateMap& CSOut );
IMPORT(void) BoundingRectangle ( TArea Area, TCoordinateMap CS, TDRect& OutputRect );
IMPORT(long) ImageDatatype ( IMG I, long index);
IMPORT(long) ImageWidth ( IMG I );
IMPORT(long) ImageHeight ( IMG I );
IMPORT(void) PixelToImage ( IMG I, double XP, double YP, double& XI, double& YI );
IMPORT(void) ImageToPixel ( IMG I, double XI, double YI, double& XP, double& YP );
IMPORT(void) PixelAreaToImage ( IMG I, TArea PixelArea, TArea& ImageArea );
IMPORT(void) ImageAreaToPixel ( IMG I, TArea ImageArea, TArea& PixelArea );
IMPORT(long) PixVal ( IMG I, long Index, long X, long Y );
IMPORT(long) RefCount ( OBJ P );
IMPORT(long) ReleaseIUnknown ( OBJ P);
#ifdef _CVDEF
IMPORT(bool) CreateMatrixTransformedImage ( IMG Img, TMatrix Matrix, IMG& ImgOut);
IMPORT(bool) CreateMatrixTransformedImageEx( IMG Img, TMatrix Matrix, IMG& ImgOut);
IMPORT(bool) CreateSubImage ( IMG Img, TArea Area, IMG& ImgOut );
IMPORT(bool) CreatePolarImage ( IMG Img, double CX, double CY, double Alpha0, double RMin, double RMax, IMG& ImgOut);
IMPORT(bool) CreatePolarImageEx ( IMG Img, double CX, double CY, double Alpha0, double AlphaTotal,double RMin, double RMax, IMG& ImgOut);
IMPORT(bool) CoordinateMapIsTranslation( TCoordinateMap CS );
IMPORT(bool) MapTo8Bit ( IMG I, BOOL CollectiveNormalization, IMG& ImgOut);
IMPORT(bool) PixelToImageCoordinates ( IMG I, double XP, double YP, double& XI, double& YI );
IMPORT(bool) ImageToPixelCoordinates ( IMG I, double XI, double YI, double& XP, double& YP );
IMPORT(bool) GetImageOrigin ( IMG I, double& OrgX, double& OrgY );
IMPORT(bool) SetImageOrigin ( IMG I, double OrgX, double OrgY );
IMPORT(bool) GetImageCoordinates ( IMG I, TCoordinateMap& CS );
IMPORT(bool) SetImageCoordinates ( IMG I, TCoordinateMap CS );
namespace CVB
{
// "... you need to set the namespace in oder to use the GetPixel function
// using namespace CVB;
IMPORT(bool) GetPixel ( IMG I, long Index, long X, long Y, long& Value );
IMPORT(bool) SetPixel ( IMG I, long Index, long X, long Y, long& Value );
};
IMPORT(bool) IsIUnknown ( OBJ P );
IMPORT(bool) IsImage ( OBJ P );
IMPORT(bool) IsGrabber ( OBJ P );
IMPORT(bool) ReleaseObject ( OBJ& P );
IMPORT(long) ReleaseImage ( IMG I );
IMPORT(bool) ShareObject ( OBJ P );
IMPORT(BOOL) HasOverlay ( IMG I );
IMPORT(BOOL) IsAll8Bit ( IMG I );
IMPORT(BOOL) IsOverlayImage ( IMG I );
IMPORT(long) ShareImage ( IMG I );
IMPORT(BOOL) MaxImageArea ( IMG I, TArea& Area );
IMPORT(bool) InverseCoordinateMap ( TCoordinateMap CSIn, TCoordinateMap &CSOut);
IMPORT(long) ImageDimension ( IMG I);
IMPORT(BOOL) InitializeImageArea ( IMG Img, long Index, TArea Area, long Value);
IMPORT(BOOL) CopyImageArea ( IMG ImgSrc, IMG ImgDst, long SrcIndex, long DstIndex, TArea Area, long TargetX0, long TargetY0);
IMPORT(BOOL) IsPixels ( OBJ P);
IMPORT(BOOL) ListPixel ( void *Pix, long Index,long &PX, long &PY, long &PZ );
IMPORT(long) PixelListCount ( PIXELLIST Pixels);
IMPORT(BOOL) SortPixelsByValue ( PIXELLIST Pixels);
IMPORT(BOOL) SortPixelsByPosition ( PIXELLIST Pixels, long X, long Y);
IMPORT(BOOL) FindMaxima ( IMG I, long PlaneIndex, long Left, long Top, long Right, long Bottom, long Locality, long Threshold, PIXELLIST& Maxima);
IMPORT(BOOL) TruncatePixelList ( PIXELLIST Pixels, long N);
IMPORT(bool) CreateDuplicateImage ( IMG I, IMG& Image );
IMPORT(bool) CreateOverlayImage ( IMG I, IMG& Image );
IMPORT(bool) CreateImageInsertList ( IMG I1, IMG I2, long Index, BOOL Share, BOOL Intersect, IMG& Image );
IMPORT(bool) CreateImageDeleteList ( IMG I, long Index, long Count, BOOL Share, IMG& Image );
IMPORT(bool) CreateImageSubList ( IMG I, long Index, long Count, BOOL Share, IMG& Image );
IMPORT(bool) CreateCompatibleImage ( IMG I, long AWidth, long AHeight, BOOL ForceOverlay, IMG& Image );
IMPORT(bool) CreateGenericImage ( long ADimension, long AWidth, long AHeight, BOOL ForceOverlay, IMG& Image );
IMPORT(bool) CreateGenericImageDT ( long ADimension, long AWidth, long AHeight, long Datatype, IMG& Image );
IMPORT(bool) CopyOverlay ( IMG ISource, IMG ITarget );
IMPORT(bool) ImageHistogram ( IMG I, long Index, long Density, TArea Area, THistogram& HGram );
IMPORT(bool) CreateNormalizedImage ( IMG I, TNormalizeMode Mode, double TargetMeanMin, double TargetVarianceMax, IMG& Image );
IMPORT(bool) CreateMeanVarianceImage ( IMG I, IMG& IMean, IMG& IVariance );
IMPORT(bool) CreateMinMaxImage ( IMG I, IMG& IMin, IMG& IMax );
IMPORT(bool) CreateLinearCombinationImage (IMG I, BOOL Reflect, void* Coefficients, IMG& Image );
IMPORT(bool) CreateColorTransform ( IMG I, long TargetDimension, BOOL Reflect, void* Coefficients, IMG& Image );
IMPORT(bool) CreateTransformedImage ( IMG Image, long TargetWidth, long TargetHeight, TFNonlinear Transformation, void *pPrivate,IMG& ImgOut);
#ifdef WIN32
IMPORT(bool) LoadImageFile ( PCHAR FileName, IMG& Image );
IMPORT(bool) PasteClipboardImage ( HWND HWindow, IMG& Image );
IMPORT(bool) WriteImageFile ( IMG I, PCHAR FileName );
IMPORT(bool) CopyImageClipboard ( IMG I, HWND HWindow );
#endif //Win32
#else
IMPORT(BOOL) CreateMatrixTransformedImage ( IMG Img, TMatrix Matrix, IMG& ImgOut);
IMPORT(BOOL) CreateMatrixTransformedImageEx( IMG Img, TMatrix Matrix, IMG& ImgOut);
IMPORT(BOOL) CreateSubImage ( IMG Img, TArea Area, IMG& ImgOut );
IMPORT(BOOL) CreatePolarImage ( IMG Img, double CX, double CY, double Alpha0, double RMin, double RMax, IMG& ImgOut);
IMPORT(BOOL) CreatePolarImageEx ( IMG Img, double CX, double CY, double Alpha0, double AlphaTotal,double RMin, double RMax, IMG& ImgOut);
IMPORT(BOOL) CoordinateMapIsTranslation( TCoordinateMap CS );
IMPORT(BOOL) MapTo8Bit ( IMG I, BOOL CollectiveNormalization, IMG& ImgOut);
IMPORT(BOOL) PixelToImageCoordinates ( IMG I, double XP, double YP, double& XI, double& YI );
IMPORT(BOOL) ImageToPixelCoordinates ( IMG I, double XI, double YI, double& XP, double& YP );
IMPORT(BOOL) GetImageOrigin ( IMG I, double& OrgX, double& OrgY );
IMPORT(BOOL) SetImageOrigin ( IMG I, double OrgX, double OrgY );
IMPORT(BOOL) GetImageCoordinates ( IMG I, TCoordinateMap& CS );
IMPORT(BOOL) SetImageCoordinates ( IMG I, TCoordinateMap CS );
IMPORT(BOOL) IsIUnknown ( OBJ P );
IMPORT(BOOL) IsImage ( OBJ P );
IMPORT(BOOL) IsGrabber ( OBJ P );
IMPORT(BOOL) ReleaseObject ( OBJ& P );
namespace CVB
{
// "... you need to set the namespace in oder to use the GetPixel function
// using namespace CVB;
... |
Partager