cxtypes.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef _CXCORE_TYPES_H_
  2. #define _CXCORE_TYPES_H_
  3. #include <assert.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. typedef struct IplImage
  7. {
  8. int nSize; /* sizeof(IplImage) */
  9. int ID; /* version (=0)*/
  10. int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
  11. int alphaChannel; /* ignored by OpenCV */
  12. int depth; /* pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
  13. IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported */
  14. char colorModel[4]; /* ignored by OpenCV */
  15. char channelSeq[4]; /* ditto */
  16. int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
  17. cvCreateImage can only create interleaved images */
  18. int origin; /* 0 - top-left origin,
  19. 1 - bottom-left origin (Windows bitmaps style) */
  20. int align; /* Alignment of image rows (4 or 8).
  21. OpenCV ignores it and uses widthStep instead */
  22. int width; /* image width in pixels */
  23. int height; /* image height in pixels */
  24. struct _IplROI *roi;/* image ROI. if NULL, the whole image is selected */
  25. struct _IplImage *maskROI; /* must be NULL */
  26. void *imageId; /* ditto */
  27. struct _IplTileInfo *tileInfo; /* ditto */
  28. int imageSize; /* image data size in bytes
  29. (==image->height*image->widthStep
  30. in case of interleaved data)*/
  31. char *imageData; /* pointer to aligned image data */
  32. int widthStep; /* size of aligned image row in bytes */
  33. int BorderMode[4]; /* ignored by OpenCV */
  34. int BorderConst[4]; /* ditto */
  35. char *imageDataOrigin; /* pointer to very origin of image data
  36. (not necessarily aligned) -
  37. needed for correct deallocation */
  38. } IplImage;
  39. struct IplROI
  40. {
  41. int coi; /* 0 - no COI (all channels are selected), 1 - 0th channel is selected ...*/
  42. int xOffset;
  43. int yOffset;
  44. int width;
  45. int height;
  46. };
  47. typedef struct CvRect
  48. {
  49. int x;
  50. int y;
  51. int width;
  52. int height;
  53. }
  54. CvRect;
  55. struct CvMemBlock;
  56. struct CvMemStorage;
  57. struct CvSeq;
  58. struct CvSize;
  59. struct CvArr;
  60. //Python stub
  61. #endif