Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Grayscale
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Numerical representations == {| style="margin:0 0 0.5em 1em; border-collapse:collapse; float:right; clear:right;" margin="0" width="5%" |- style="background-color:#FFFFFF;" | |- style="background-color:#EEEEEE;" | |- style="background-color:#DDDDDD;" | |- style="background-color:#CCCCCC;" | |- style="background-color:#BBBBBB;" | |- style="background-color:#AAAAAA;" | |- style="background-color:#999999;" | |- style="background-color:#888888;" | |- style="background-color:#777777;" | |- style="background-color:#666666;" | |- style="background-color:#555555;" | |- style="background-color:#444444;" | |- style="background-color:#333333;" | |- style="background-color:#222222;" | |- style="background-color:#111111;" | |- style="background-color:#000000;" | |} The intensity of a pixel is expressed within a given range between a minimum and a maximum, inclusive. This range is represented in an abstract way as a range from 0 (or 0%) (total absence, black) and 1 (or 100%) (total presence, white), with any fractional values in between. This notation is used in academic papers, but this does not define what "black" or "white" is in terms of [[colorimetry]]. Sometimes the scale is reversed, as in [[printing]] where the numeric intensity denotes how much ink is employed in [[halftoning]], with 0% representing the paper white (no ink) and 100% being a solid black (full ink). In computing, although the grayscale can be computed through [[rational numbers]], image pixels are usually [[Quantization (signal processing)|quantized]] to store them as unsigned integers, to reduce the required storage and computation. Some early grayscale monitors can only display up to sixteen different shades, which would be stored in [[Binary code|binary]] form using 4 [[bit]]s.{{citation needed|date=March 2022}} But today grayscale images intended for visual display are commonly stored with 8 bits per sampled pixel. This pixel [[Color depth|depth]] allows 256 different intensities (i.e., shades of gray) to be recorded, and also simplifies computation as each pixel sample can be accessed individually as one full [[byte]]. However, if these intensities were spaced equally in proportion to the amount of physical light they represent at that pixel (called a linear encoding or scale), the differences between adjacent dark shades could be quite noticeable as banding [[compression artifact|artifacts]], while many of the lighter shades would be "wasted" by encoding a lot of perceptually-indistinguishable increments. Therefore, the shades are instead typically spread out evenly on a [[gamma correction|gamma-compressed nonlinear scale]], which better approximates uniform perceptual increments for both dark and light shades, usually making these 256 shades enough to avoid noticeable increments.<ref>{{cite book |last= Poynton |first= Charles |date= 2012 |title= Digital Video and HD: Algorithms and Interfaces |edition= 2nd |author-link= Charles Poynton |publisher= [[Morgan Kaufmann]] |url= https://books.google.com/books?id=dSCEGFt47NkC |access-date= 2022-03-31 |pages= 31β35, 65β68, 333, 337 |isbn= 978-0-12-391926-7}}</ref> Technical uses (e.g. in [[medical imaging]] or [[remote sensing]] applications) often require more levels, to make full use of the [[sensor]] accuracy (typically 10 or 12 bits per sample) and to reduce rounding errors in computations. Sixteen bits per sample (65,536 levels) is often a convenient choice for such uses, as computers manage 16-bit [[Word (data type)|words]] efficiently. The [[Tagged Image File Format|TIFF]] and [[Portable Network Graphics|PNG]] (among other) [[image file formats]] support 16-bit grayscale natively, although browsers and many imaging programs tend to ignore the low order 8 bits of each pixel. Internally for computation and working storage, image processing software typically uses integer or floating-point numbers of size 16 or 32 bits.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)