BGR色彩空间 [英] BGR Color Space

查看:468
本文介绍了BGR色彩空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我明白RGB ---值(0-255)红色,(0-255)绿色(0-255)蓝色形成一种颜色。



什么是BGR颜色空间?
它与RGB颜色空间有什么不同?

解决方案

RGB代表红绿蓝。通常,RGB颜色存储在结构或无符号整数中,其中蓝色占据最低有效区域(32位和24位格式中的一个字节),绿色第二最少,而红色第三最少。 p>

BGR是相同的,除了区域的顺序颠倒。



在某些平台上(例如 Gamegear )使用BGR模型。然而,对于大多数,像您的计算机,RGB被使用[需要引用](虽然BGR支持许多图形API的兼容性)。我不确定为什么完全使用它;



示例:#FF0000读为RGB十六进制颜色(#rrggbb)时为纯红色,因为第三个区域(数字从右到左!是FF(最大值,全色),其他两个区域是00(最小值,无颜色)。如果#FF0000读为BGR的十六进制颜色,它将是纯蓝色的。


I understand RGB --- value (0-255)Red,(0-255)Green,(0-255)Blue to form a color.

What is exactly BGR color space ? How is it different from RGB color space ?

解决方案

RGB stands for Red Green Blue. Most often, an RGB color is stored in a structure or unsigned integer with Blue occupying the least significant "area" (a byte in 32-bit and 24-bit formats), Green the second least, and Red the third least.

BGR is the same, except the order of areas is reversed. Red occupies the least significant area, Green the second (still), and Blue the third.

On some platforms (e.g. the Gamegear) a BGR model is used. However, for most, like your computer, RGB is used [citation-needed] (though BGR is supported by many graphic API's for compatability). I'm not sure why exactly it's used; probably historical.

Example: #FF0000 is pure red when read as an RGB hex color (#rrggbb), because the third area (numbers are read right to left!) is FF (maximum value, full color) and the other two areas are 00 (minimum value, no color). If #FF0000 were read as a BGR hex color, it'd be pure blue.

这篇关于BGR色彩空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆