20060203-All about pixel colors: Truecolor and indexed images
来源:互联网 发布:jq淘宝购物车结算代码 编辑:程序博客网 时间:2024/05/16 14:34
原文:http://blogs.mathworks.com/steve/2006/02/03/all-about-pixel-colors-part-2/
Let's start by exploring MATLAB's two basic pixel-color display models:
- Matrix element values specify pixel colors directly
- Matrix element values specify pixel colors indirectly, through the figure's colormap
Truecolor images
Here's an illustrative image with just three pixels: red, blue, and yellow.
plane_1 = [1 0 1];plane_2 = [0 0 1];plane_3 = [0 1 0];rgb = cat(3, plane_1, plane_2, plane_3);size(rgb)image(rgb)axis imagetitle('Truecolor image with one red, one blue, and one yellow pixel')With truecolor images, changing the colormap has no effect on the image colors displayed.
colormap(hot)title('Changing the figure colormap does not affect the pixel colors')
Indexed images
If the image CData is two-dimensional, then the CData values are treated as lookup indices into the figure's colormap.
s = load('clown')
image(s.X)colormap(s.map)title('Indexed image')Unlike truecolor images, indexed images are affected by changes in the figure's colormap.
colormap(cool)title('Indexed image displays incorrectly if you use the wrong colormap')
0 0
- 20060203-All about pixel colors: Truecolor and indexed images
- 20060210-All about pixel colors: Scaled indexed images
- 20060405-All about pixel colors: Grayscale and binary images
- 20060217-All about pixel colors: Window-level and CLim
- 20060224- All about pixel colors: Reference information
- Google, with new Pixel and camera, is serious about devices
- All about Oracle FED and KFOD tools
- All about oracle smallfile and bigfile tablespace
- 数字图像处理实验(3):PROJECT 02-03, Zooming and Shrinking Images by Pixel Replication
- All about "about face"
- Google Android 原生Rom 下载地址及刷机教程--Factory Images for Nexus and Pixel Devices
- All About Process On Value and Process On Help
- All About Process On Value and Process On Help
- ALL about SYSDBA and SYSOPER Privileges in Oracle [ID 50507.1]
- Multiply all even indexed integers by two
- Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken
- Point and Pixel
- Tk Tutorial - 11. Fonts, Colors, Images
- Mac软件下载网站
- 中俄加强全球范围
- 什么是数据科学家
- JQuery获取基本对象的方法
- 如何提高自己的acm个人能力
- 20060203-All about pixel colors: Truecolor and indexed images
- [Node.js] express 安装的问题
- fopen();r 、w、w+....
- Fedora20下安装WireShark
- 半平面交题目汇总
- ubuntu内核删掉了怎么办?
- 《算法导论》笔记 第15章 15.3 动态规划基础
- Delphi制作注册机
- 我为什么选择go语言