转载自https://www.geeksforgeeks.org/matlab-rgb-image-representation/

MATLAB | RGB image representation

An RGB image can be viewed as three different images(a red scale image, a green scale image and a blue scale image) stacked on top of each other, and when fed into the red, green and blue inputs of a colour monitor, it produces a colour image on the screen.

An RGB image is sometimes referred to as a true colour image as the precision with which a real-life image can be replicated has led to the nickname “true colour image.”

 

In MATLAB, an RGB image is basically a M*N*3 array of colour pixel, where each colour pixel is associated with three values which correspond to red, blue and green colour component of RGB image at a specified spatial location.
So, the colour of any pixel is determined by the combination of the red, green, and blue intensities stored in each colour plane at the pixel’s location.
Here each colour plane is a M*N array.

As can be seen in the above image, Pixel(A) has value (255, 0, 255) and is determined by the combination of intensities stored in the red colour plane, green colour plane and blue colour plane respectively.

Similarly, pixel(B) has value (127, 255, 0) and is determined in the same manner as pixel(A).

Colour planes of RGB image:
Consider an RGB image array ‘I’ then,
I(:, :, 1) represents the Red colour plane of the RGB image
I(:, :, 2) represents the Green colour plane of the RGB image
I(:, :, 3) represents the Blue colour plane of the RGB image

RGB image array range:
In MATLAB, an RGB image array can be of class ‘double’, ‘uint8’, or ‘uint16’ datatype. The datatype class of colour component determines the range of values.
For example,
if an RGB image is of class ‘double’ then each colour component is a value between 0 and 1.
Similarly, if an RGB image is of class ‘uint8’, the range of values that each colour component can have is [0 – 255] and [0 – 65535 ] if the RGB image is of class ‘uint16’.

Bit depth:
The number of bits used to store a pixel value of component image determines the bit depth of an RGB image. For example, if each colour component image is an 8-bit image, the RGB image will be said to have 24 bit deep.

Possible number of colours in RGB image:
Let an RGB image is of class ‘uint8’, i.e the range of values a colour component plane can have is [0 – 255 ] ( a total of 256 shades of that colour).
So, each individual colour plane of An RGB image is capable of showing 256 shade of that colour.
So total number of combination of colour that can be represented in an RGB image is 256 X 256 X 256 = 16777216, approximately 16 million.

[转载] MATLAB | RGB image representation的更多相关文章

  1. [转载]Matlab之静态文本多行输出

    转载文章,原文链接:Matlab中的静态文本框中显示多行内容 有时候,我们在GUI中利用静态文本框显示程序的结果,但是结果很长,一行未必可以显示的开,而静态文本框不像edit或listbox那样通过滚 ...

  2. [转载]Matlab中fft与fftshift命令的小结与分析

    http://blog.sina.com.cn/s/blog_68f3a4510100qvp1.html 注:转载请注明出处——by author. 我们知道Fourier分析是信号处理里很重要的技术 ...

  3. [转载]Matlab生成Word报告

    最近在进行一批来料的检验测试,一个个手动填写报告存图片太慢了,就有了种想要使用Matlab在分析完后数据可以自动生成PDF报告的想法,于是就去网上搜索了相关的资料,发现Matlab中文论坛上有xiez ...

  4. [转载]MATLAB中FFT的使用方法

    http://blog.163.com/fei_lai_feng/blog/static/9289962200971751114547/ 说明:以下资源来源于<数字信号处理的MATLAB实现&g ...

  5. [转载]Matlab中插值函数汇总和使用说明

    http://blog.sciencenet.cn/blog-457143-679275.html MATLAB中的插值函数为interp1,其调用格式为:  yi= interp1(x,y,xi,' ...

  6. [转载] MATLAB快捷键

    原文地址,点此查看 一.常用对象操作 除了一般windows窗口的常用功能键外. 1.!dir 可以查看当前工作目录的文件. !dir& 可以在dos状态下查看. 2.who   可以查看当前 ...

  7. [转载]matlab图像处理为什么要归一化和如何归一化

    matlab图像处理为什么要归一化和如何归一化,一.为什么归一化1.   基本上归一化思想是利用图像的不变矩寻找一组参数使其能够消除其他变换函数对图像变换的影响.也就是转换成唯一的标准形式以抵抗仿射变 ...

  8. 006——转载-MATLAB数字与字符之间的转换

    (一)参考文献:https://jingyan.baidu.com/article/5bbb5a1bd8dcb113eba1799d.html (二)数字转换成字符串 第一步在我们的电脑上打开matl ...

  9. [转载]matlab视频读取函数VideoReader

    看到以前matlab中读取视频多 使用mmreader等(参考<matlab读取/播放视频的函数>),而现在matlab有一个专门的视频读取类VideoReader完成视频读取的功能. 相 ...

  10. 转载 matlab矩阵数组常用操作

    一. length             返回矩阵最长维的的长度    ndims       返回维数          numel      返回矩阵元素个数size               ...

随机推荐

  1. 01Python变量的使用

    Python变量 变量的定义 变量:在程序运行过程中,值会发生变化的量 把程序运算的中间结果临时存到内存里,以备后面的代码继续调用,这几个名字的学名就叫做"变量". 变量的作用 我 ...

  2. redis(4)String字符串

    前言 Redis中有5大数据类型,分别是字符串String.列表List.集合Set.哈希Hash.有序集合Zset,本篇介绍Redis的字符串String Redis字符串 String是Redis ...

  3. dotnet总结

    初衷: 搞了几年.Net ,一直没在博客园做过系统的总结,并打算按照下面的结构来写 语言层面 类型系统 [查看]: https://www.cnblogs.com/francisXu/p/136027 ...

  4. Word 设置脚注和尾注

    描述 脚注一般位于页面的底部,作为文档某处内容的注释.尾注一般位于文档的末尾,列出引文的出处等. 设置脚注和尾注 将光标移动到要插入脚注或尾注的地方,然后点击"引用"选项卡. 左边 ...

  5. 基于IGServer的Web地图要素增删改查

    1. 引言 MapGIS IGServer 是中地数码的一款跨平台GIS 服务器产品,提供了空间数据管理.分析.可视化及共享服务 MapGIS IGServer的下载(试用)地址:MapGIS IGS ...

  6. asp汉字转拼音小写

    <%'//获取汉字的首字母 ,ANSII编码function getpychar(char) dim tmpp:tmpp=65536+asc(char) if(tmpp>=45217 an ...

  7. C#窗体控件,文字随电脑分辨率自动调整大小

    一.在类中添加方法,代码如下: #region 窗体控件.字体随分辨率调整,自动调整大小 public static void SetTag(Control cons) { foreach (Cont ...

  8. How to present a paper 怎么讲好一篇文献

    Author : 如果在冬夜一个旅人 Date : 2022/05/24 目录 背景说明 1 读文献 1.1 读文献的层次 1.2 论文阅读的首轮次序 2 讲文献 2.1 The Problem to ...

  9. Word12 财务部制作本年年度报告office真题

    1.根据题目一的要求,打开素材文件,点击[文件]-[另存为],选择[当前文件夹],命名为Word. 2.根据题目二的要求,在[开始]里点击[样式]的右下角,打开样式窗口,勾选[显示预览],选中文字,鼠 ...

  10. html添加公共文件

    html添加公共文件 记录添加公共头尾文件的方法 thymeleaf模板引擎 common.html index.html