- Visual Media Processing Using Matlab Beginner's Guide
- George Siogkas
- 451字
- 2021-08-06 16:38:01
An introduction to color image processing
Before we begin examining the differences of color image processing to grayscale image processing techniques, we must first understand the difference between color and grayscale images. As explained in previous chapters, a grayscale image can be represented as a two-dimensional, m-by-n matrix (m rows and n columns). Its elements, called pixels, have values spreading from 0 to 255 (in the case of 8-bit images). A value of zero represents black, a value of 255 represents white, while all the values in between represent different shades of gray.
In the case of color images, the matrices become three-dimensional. The first two dimensions, as in the case of grayscale images, are the number of rows and the number of columns (m-by-n). The difference is that the third dimension typically comprises three layers, representing colors. That is, color images are three-dimensional (usually m-by-n-by-3) matrices and can be thought of as three grayscale images combined together. Each image typically represents one of the colors (that is, Red, Green, and Blue) of the image, which is therefore characterized as RGB. These three layers are also called color channels of the color space (RGB in our case).
Similarly to the grayscale image case, when we have a case of color images of 8-bits per channel, a zero value in one channel represents non-presence of the color, while a 255 value suggests full color presence. The three color channels are mixed together to produce the final color for each pixel in the image. A pure fundamental color occurs when one of the three color channels has the maximum value and the two others are equal to zero. This means that a pixel with {R, G, B} values equal to {255, 0, 0} will be pure red. Similarly, a pixel with values {0, 255, 0} will be pure green and a pixel with values {0, 0, 255} will be pure blue. Different mixtures of values in the three basic color channels will ultimately produce different colors.
Note
A more extensive description of the basic concepts of RGB color images can be found in Chapter 2, Introduction, of the manual of the Image Processing Toolbox. It can be found freely available in pdf format on the website of Mathworks, at http://www.mathworks.com/help/pdf_doc/images/images_tb.pdf.
What you may have deduced from the previous description of color images, is the fact that in order to apply the methods covered in previous chapters for color image processing, we will have to repeat the same process three times (one for each color channel). This is typically correct, as we will see in the rest of this chapter. Let's start with the basic image manipulations covered in Chapter 1, Basic Image Manipulations.
- Linux KVM虛擬化架構實戰指南
- Augmented Reality with Kinect
- Linux運維之道(第2版)
- 施耐德SoMachine控制器應用及編程指南
- 電腦組裝、維護、維修全能一本通(全彩版)
- Manage Partitions with GParted How-to
- 電腦軟硬件維修從入門到精通
- 分布式微服務架構:原理與實戰
- 深入理解序列化與反序列化
- Intel Edison智能硬件開發指南:基于Yocto Project
- 嵌入式系統原理及應用:基于ARM Cortex-M4體系結構
- Instant Website Touch Integration
- 計算機組裝、維護與維修項目教程
- Spring微服務實戰(第2版)
- PLC技術實用教程