WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Finance Platform
System Modeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Application Server
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Tech & Trends
Machine Learning
Multiparadigm Data Science
High-Performance Computing
Quantum Computation Framework
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
Legacy Documentation
Digital Image Processing
(2000)
This is documentation for an obsolete product.
Current products and services
User's Guide
Image Representation
2.3 Color Image Representation
A color digital image is typically represented by a triplet of values, one for each of the color channels, as in the frequently used RGB color scheme. The letters R, G, B stand for red, green, and blue. The individual color values are almost universally 8-bit values, resulting in a total of 3 bytes (or 24 bits) per pixel. This yields a three-fold increase in the storage requirements for color versus monochrome images.
Naturally, there are a number of alternative data structures for multicolor image data. The so-called pixel-interleaved (or meshed) and color-interleaved (or planar) formats are the most widely used. Less frequent are row-wise or column-wise interleaving methods. In a pixel-interleaved format, the raw image data is contained in a 2D array, with every element being a list of three values:
In the color-interleaved format, the raw data is separated into three 2D matrices, one for each of the color channels:
The three primary colors may be used to synthesize any one of 2
24
or approximately 16 million colors. In the following we show a small selection of combinations of {
r, g, b
} color values. In each colored square the red and blue color values are varied in increments of
, with the amount of green increasing in the same manner from left to right. Note that we use a normalized value range for specifying color values. Thus when using a
Mathematica
graphics directive, such as
RGBColor
, the values must be in the range 0≤ r, g, b ≤1.
In[1]:=
Out[1]=
Equal amounts of each of the three colors result in a shade of gray. Here is a grayscale ramp from an
RGBColor
directive.
In[2]:=
Out[2]=
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »