关于IplImage结构体内指针imageData指向的数据的数据类型的问题
来源:互联网 发布:现金流量表数据来源 编辑:程序博客网 时间:2024/04/30 01:34
typedef struct _IplImage
{
int nSize; /* sizeof(IplImage) */
int ID; /* version (=0)*/
int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
int alphaChannel; /* Ignored by OpenCV */
int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. */
char colorModel[4]; /* Ignored by OpenCV */
char channelSeq[4]; /* ditto */
int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
cvCreateImage can only create interleaved images */
int origin; /* 0 - top-left origin,
1 - bottom-left origin (Windows bitmaps style). */
int align; /* Alignment of image rows (4 or 8).
OpenCV ignores it and uses widthStep instead. */
int width; /* Image width in pixels. */
int height; /* Image height in pixels. */
struct _IplROI *roi; /* Image ROI. If NULL, the whole image is selected. */
struct _IplImage *maskROI; /* Must be NULL. */
void *imageId; /* " " */
struct _IplTileInfo *tileInfo; /* " " */
int imageSize; /* Image data size in bytes
(==image->height*image->widthStep
in case of interleaved data)*/
char *imageData; /* Pointer to aligned image data. */
int widthStep; /* Size of aligned image row in bytes. */
int BorderMode[4]; /* Ignored by OpenCV. */
int BorderConst[4]; /* Ditto. */
char *imageDataOrigin; /* Pointer to very origin of image data
(not necessarily aligned) -
needed for correct deallocation */
}
{
int nSize; /* sizeof(IplImage) */
int ID; /* version (=0)*/
int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
int alphaChannel; /* Ignored by OpenCV */
int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. */
char colorModel[4]; /* Ignored by OpenCV */
char channelSeq[4]; /* ditto */
int dataOrder; /* 0 - interleaved color channels, 1 - separate color channels.
cvCreateImage can only create interleaved images */
int origin; /* 0 - top-left origin,
1 - bottom-left origin (Windows bitmaps style). */
int align; /* Alignment of image rows (4 or 8).
OpenCV ignores it and uses widthStep instead. */
int width; /* Image width in pixels. */
int height; /* Image height in pixels. */
struct _IplROI *roi; /* Image ROI. If NULL, the whole image is selected. */
struct _IplImage *maskROI; /* Must be NULL. */
void *imageId; /* " " */
struct _IplTileInfo *tileInfo; /* " " */
int imageSize; /* Image data size in bytes
(==image->height*image->widthStep
in case of interleaved data)*/
char *imageData; /* Pointer to aligned image data. */
int widthStep; /* Size of aligned image row in bytes. */
int BorderMode[4]; /* Ignored by OpenCV. */
int BorderConst[4]; /* Ditto. */
char *imageDataOrigin; /* Pointer to very origin of image data
(not necessarily aligned) -
needed for correct deallocation */
}
IplImage;
这是IplImage结构体的定义,其中imageData是char型的指针。在用其对灰度图像进行像素值操作时,得到的像素值不是位于1-255区间的,所以我是将其转化为unsigned char型数据后再进行操作,但是,对其中的关系想的不是很明白,先写在这,明白了再继续修改
- 关于IplImage结构体内指针imageData指向的数据的数据类型的问题
- OpenCV关于IplImage的imageData问题出现负值
- C++ IplImage 读取imagedata内的数据
- VC下使用OpenCV最好先修改一下结构体IplImage中的数据指针imageData的类型...
- 结构体内的指针
- OpenCV中IplImage->imageData赋值需要注意的问题
- OpenCV中IplImage->imageData赋值需要注意的问题 .
- 关于结构体内存对齐的问题
- 关于指向结构体的指针
- 指向结构体类型数据的指针
- 指向结构体类型数据的指针
- 指向结构体类型数据的指针
- 指向结构体类型数据的指针
- 指向结构体类型数据的指针
- 指向结构体类型数据的指针
- 指向结构的指针
- 指向结构的指针
- 关于指向结构体的指针——又一个指针用法中容易忽略的问题
- 多重背包变形--poj2392
- poj 2243 Knight Moves
- StringBuffer toString 输出乱码问题
- php对用户输入数据的转义处理
- 如何卸载ROS,针对不同版本不太一样:【uninstall ros】
- 关于IplImage结构体内指针imageData指向的数据的数据类型的问题
- SVM多分类(利用libsvm工具箱)
- Linux 学习笔记之 6 Linux系统启动和服务
- c语言小代码——对齐
- c++中的内存分配方式,以及使用过程中需要小心的地方
- Jquery 获得Form下的所有text、checkbox等表单的值
- Hadoop常见问题及解决办法
- jquery 学习 (二)
- Linux中的常用命令