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;

3IplImage*拜候图像像素:widthStep
对8bit , 单通道 , unsigned char类型的图像I---IplImage* img:
I(x, y)~((unsigned char*)(img->imageData+img->widthStep*y))[x];
对8bit , 3通道 , unsigned char类型的图像I---IplImage* img:
I(x, y)blue~((unsigned char*)(img->imageData+img->widthStep*y))[x*3];
I(x, y)green~((unsigned char*)(img->imageData+img->widthStep*y))[x*3+1];
I(x, y)red~((unsigned char*)(img->imageData+img->widthStep*y))[x*3+2];
猜你喜欢
- OpenCV:TermCriteria迭代终止条件
- OpenCV:xml文件的读取与写入
- OpenCV:waitKey函数
- OpenCV:resize函数 VS vector:resize函数
- OpenCV:norm-范数求解函数
- OpenCV:goodFeaturesToTrack角点检测的应用
- OpenCV:相机标定示例程序的使用
- OpenCV:相机标定函数和程序
- 如何在Win10上安装STEP 7 V14
- 科学家庭理财step by step,规划幸福人生
