OpenCV常见数据类型

[图像处理]-Opencv中数据类型CV_8U, CV_16U, CV_16S, CV_32F 以及 CV_64F是什么?

ROS学习笔记–cv_bridge

CV_8U, CV_16U, CV_16S, CV_32F 以及 CV_64F,都是OpenCV定义的数据类型

OpenCV常见数据类型_第1张图片
图像编码可以是一下任意一种OpenCV支持的图像编码:

  • 8UC[1-4]
  • 8SC[1-4]
  • 16UC[1-4]
  • 16SC[1-4]
  • 32SC[1-4]
  • 32FC[1-4]
  • 64FC[1-4]

对于某些常用的编码,CvBridge提供了可选的color或pixel depth的转换,要想使用这个特性,需要将编码指定为一下格式之一:

  • mono8: CV_8UC1, grayscale image
  • mono16: CV_16UC1, 16-bit grayscale image
  • bgr8: CV_8UC3, color image with blue-green-red color order
  • rgb8: CV_8UC3, color image with red-green-blue color order
  • bgra8: CV_8UC4, BGR color image with an alpha channel
  • rgba8: CV_8UC4, RGB color image with an alpha channel

你可能感兴趣的:(开发,opencv)