1. type在modules/core/include/opencv2/core/hal/interface.h中定义
define CV_CN_MAX 512
define CV_CN_SHIFT 3
define CV_DEPTH_MAX (1 << CV_CN_SHIFT)
define CV_8U 0
define CV_8S 1
define CV_16U 2
define CV_16S 3
define CV_32S 4
define CV_32F 5
define CV_64F 6
define CV_USRTYPE1 7
define CV_MAT_DEPTH_MASK (CV_DEPTH_MAX - 1)
2.头文件
opencv3.0以上rectangle在opencv2/imgproc.hpp中,以前版本在opencv2/highgui/highgui.hpp
3.坐标问题
1.像素坐标系原点在左上方,x轴向右,y轴向下,(x,y)表示第x列第y行,适用于Point,Rectangle等数据类型
2.在使用at访问像素值时,(x,y)表示第x行第y列,bgr.at < Vec3b>(x, y)[0]表示第x行第y列像素的blue