CV_IMAGE_ELEM

来源:互联网 发布:淘宝店招收藏店铺代码 编辑:程序博客网 时间:2024/05/20 14:15


/opencv2/core/types_c.h 

里面有这样一个宏,可以快速取得 某点 处的像素值

/* get reference to pixel at (col,row),   for multi-channel images (col) should be multiplied by number of channels */#define CV_IMAGE_ELEM( image, elemtype, row, col )       \    (((elemtype*)((image)->imageData + (image)->widthStep*(row)))[(col)])



ps: 这里面还有最熟悉的  IplImage 的定义。。。。







原创粉丝点击