CV_8U CV_32F, and CV_32S
2015-06-21 22:28
387 查看
转自:http://stackoverflow.com/questions/8377091/what-are-the-differences-between-cv-8u-and-cv-32f-and-what-should-i-worry-about
CV_8U is unsigned 8bit/pixel - ie a pixel can have values 0-255, this is the normal range for most image and video formats.
CV_32F is float - the pixel can have any value between 0-1.0, this is useful for some sets of calculations on data - but it has to be converted into 8bits to save or display by multiplying each pixel by 255.
CV_32S is a signed 32bit integer value for each pixel - again useful of you are doing integer maths on the pixels, but again needs converting into 8bits to save or display. This is trickier since you need to decide how to convert the much larger range of possible values (+/- 2billion!) into 0-255
CV_8U is unsigned 8bit/pixel - ie a pixel can have values 0-255, this is the normal range for most image and video formats.
CV_32F is float - the pixel can have any value between 0-1.0, this is useful for some sets of calculations on data - but it has to be converted into 8bits to save or display by multiplying each pixel by 255.
CV_32S is a signed 32bit integer value for each pixel - again useful of you are doing integer maths on the pixels, but again needs converting into 8bits to save or display. This is trickier since you need to decide how to convert the much larger range of possible values (+/- 2billion!) into 0-255
相关文章推荐
- MySQL数据库中插入中文出现乱码的解决方案
- Spring MVC处理错误的三种方法
- css积累
- leetcode——Generate Parentheses
- java学习之旅02--计算机语言发展史,Java历史,Java核心优势,Java三大版本的区别
- 团队作业第五周-运行与总结
- 人,绩效和职业道德 读后感
- 读后感
- 读后感
- 实战部署weblogic集群及发布应用(5)
- Xcode中的快捷键使用
- Uva - 714 - Copying Books
- Uva - 714 - Copying Books
- 指针和引用的区别
- 欢迎使用CSDN-markdown编辑器
- MySql语句大全:创建、授权、查询、修改等
- 【TYVJ】1062 合并傻子
- OS中的P,V原语有哪些应用?
- 读后感
- LintCode 合并两个排序链表