{
  "id": "pixel",
  "title": "Pixel",
  "lang": "en",
  "source_lang": "en",
  "summary": "A pixel is an individually addressable element of a digital image or display, carrying sampled information about color, brightness, or another measured quantity.",
  "category": "computer-science",
  "subcategory": "software",
  "type": "concept",
  "aliases": [
    "Picture element",
    "pel"
  ],
  "generated_at": "2026-11-02",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/pixel/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/pixel/",
      "json": "https://aiwiki.page/zh/pixel.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A pixel, short for picture element, is an individually addressable element of a digital image or image-producing system. In a raster image, pixels occupy positions in an ordered array, and each position has one or more numerical values representing brightness, color, transparency, or another quantity. In display hardware, the word also denotes a controllable picture element that produces or modulates light. These meanings are related but not identical: an image pixel is data, whereas a display pixel is a physical component.\n\nPixels are fundamental to digital photography, electronic displays, computer graphics, and image processing. They provide a common representation through which cameras, software, storage formats, and screens exchange pictures. Nevertheless, a pixel has no universal physical size, shape, or color representation. Its interpretation depends on sampling geometry, numerical encoding, image metadata, and the device or process that renders it."
    },
    {
      "heading": "Image samples and raster geometry",
      "text": "A digital raster image is commonly represented as a rectangular array with width \\(W\\) and height \\(H\\). Each pixel has an address, often written \\((x,y)\\), where \\(0\\leq x<W\\) and \\(0\\leq y<H\\). Many image formats and graphics interfaces place the origin at the upper-left corner, with the vertical coordinate increasing downward; other systems use different conventions. Addressing conventions are therefore part of an image’s interpretation rather than an intrinsic property of pixels. Mathematically, a single-channel image resembles a matrix, while a color image can be represented by several such arrays or by an array of multicomponent records.\n\nAn image pixel is best understood as a sample, not necessarily as a little square. The square blocks visible when an image is enlarged with nearest-neighbor interpolation are one way to display those samples. They are not evidence that the original scene consisted of square pieces. A camera measurement typically combines light over a finite sensor area and exposure interval, while a computer-generated sample may estimate a filtered contribution from a continuous scene. In both cases, the stored number represents the output of a measurement or calculation with spatial extent.\n\nAn idealized acquisition model expresses a pixel value as\n\n\\[p_{ij}=\\iint f(x,y)\\,h(x-x_i,y-y_j)\\,dx\\,dy,\\]\n\nwhere \\(f(x,y)\\) describes a continuous image quantity and \\(h\\) describes the combined spatial response of the imaging system. Optical blur, sensor aperture, and deliberate filtering can all contribute to this response. Quantization then maps the measurement to a permitted numerical value. This model distinguishes the sampling location from the area influencing the sample; neighboring samples may contain contributions from overlapping regions.\n\nAlthough rectangular arrays dominate, pixels need not have square spacing. Some video systems use nonsquare pixel aspect ratios, and scientific instruments may acquire samples on irregular or hexagonal arrangements before converting them to a conventional raster. A pixel’s aspect ratio describes its intended displayed width relative to its height, not the ratio between the image’s total width and height.\n\nPixels can also carry quantities other than visible color. A depth image may store distance, a thermal image temperature, and a segmentation image a category identifier. Such arrays share an addressing structure without sharing the same arithmetic: averaging two brightness values may be meaningful, whereas averaging two category numbers usually is not. A voxel, or volume element, extends the related idea to three-dimensional sampled data, but it denotes a distinct type of element rather than an unusually large pixel."
    },
    {
      "heading": "Terminology and historical development",
      "text": "The pixel concept emerged from several earlier practices rather than from a single invention. Halftone printing represented continuous tone through patterns of marks, television divided moving images into scan lines, and facsimile systems transmitted pictures by scanning successive locations. These technologies established ways to decompose pictures spatially, although an analog television signal does not inherently consist of a fixed number of digital horizontal samples. A raster is a scanning or ordering structure; it becomes a digital pixel array when positions and values are discretely represented.\n\nElectronic image processing developed rapidly in scientific and aerospace work during the mid-twentieth century. Pictures transmitted by spacecraft required correction, enhancement, and reconstruction using digital computers. Frederic C. Billingsley used the word pixel in publications in 1965 describing image-processing work at the Jet Propulsion Laboratory. The word combines pix, an established abbreviation for pictures, with element. The longer expression picture element predates this usage. The shortened form pel also appears in technical literature, particularly in imaging, printing, and coding contexts.\n\nEarly computer graphics did not always use pixel-addressed displays. Vector displays drew lines by steering an electron beam along geometric paths, making them suitable for oscilloscopes, engineering graphics, and some early interactive systems. Raster displays instead scanned a regular field. As memory and electronic components became less expensive, framebuffers made it practical to store the values associated with every screen location. A framebuffer could support filled areas, arbitrary photographs, and general-purpose graphics without describing the picture solely as a collection of lines.\n\nThe relationship between pixels and available memory strongly shaped early systems. A \\(640\\times480\\) monochrome image requires 38,400 bytes when each pixel occupies one bit and storage is tightly packed. The same dimensions with three eight-bit color channels require 921,600 bytes. Palette-based graphics, bitplanes, and restricted color modes reduced these demands. Such constraints influenced operating-system interfaces and game artwork as much as hardware engineering: icons, fonts, and sprites were often designed for particular grids and limited palettes.\n\nLater developments separated the digital image increasingly from any single display. The same file could be viewed on a desktop monitor, printed on paper, or enlarged on a handheld screen. High-density displays further weakened the once-common assumption that a software coordinate corresponded to one physical display pixel. Contemporary usage therefore retains several historical layers: a pixel may mean a stored image sample, a framebuffer location, a hardware picture element, or a logical layout unit. Technical descriptions must identify which layer is intended."
    },
    {
      "heading": "Numerical values, color, and transparency",
      "text": "A pixel’s numerical structure is usually described by its channels and the precision assigned to each channel. A grayscale pixel may contain one intensity value, while an RGB pixel contains red, green, and blue components. With eight bits per channel, each component has 256 possible codes, producing \\(256^3=16{,}777{,}216\\) RGB combinations. This count describes the available numerical combinations, not the number of colors a particular person can distinguish or a particular screen can reproduce. Some combinations may also become indistinguishable after conversion or display.\n\nBit depth must be distinguished from storage size. A pixel with three eight-bit channels contains 24 bits of color information but may occupy a 32-bit memory slot for alignment or to include another channel. Scientific and high-dynamic-range workflows often use 16-bit integers or floating-point values. Floating-point pixels can represent values above a nominal display white and, in some processing stages, negative values. These numbers are intermediate quantities rather than instructions for a screen to emit negative light.\n\nRGB numbers alone do not uniquely identify a color. Their interpretation requires a color space, including definitions of the primaries, reference white, and transfer characteristics. The widely used sRGB color space encodes values nonlinearly. Consequently, the arithmetic mean of two encoded values generally does not equal the encoding of their mean light intensity. Physically meaningful operations such as light accumulation normally require linear-light values. Other encodings, including luminance–chrominance representations used in video and photographic compression, organize components for different processing or transmission needs.\n\nAn alpha channel commonly represents opacity or coverage for compositing. In the simple foreground-over-opaque-background case, using compatible linear-light colors gives\n\n\\[C_{\\mathrm{out}}=\\alpha C_{\\mathrm{foreground}}+ (1-\\alpha)C_{\\mathrm{background}}.\\]\n\nHere \\(\\alpha=1\\) makes the foreground fully opaque and \\(\\alpha=0\\) leaves only the background. Alpha is not necessarily an optical measurement of material transparency; in rendered graphics it often also expresses how much of a pixel footprint a shape covers.\n\nTwo conventions store alpha-related data differently. Straight alpha stores color independently of alpha, while premultiplied alpha stores color already multiplied by alpha. Confusing the conventions can produce dark or bright fringes around composited edges, especially after filtering. Other representations include indexed color, in which a pixel stores a reference to a palette entry rather than explicit color components. A palette image can therefore have compact pixel codes while obtaining its actual colors from a separate table. These distinctions explain why a numerical pixel value cannot be interpreted reliably without its format and color metadata."
    },
    {
      "heading": "Pixels in cameras and image sensors",
      "text": "In a digital camera, light is converted into electrical signals by an image sensor. Two major sensor technologies are charge-coupled devices and CMOS image sensors. Both use photosensitive structures fabricated in semiconductor material, although their charge-transfer and readout arrangements differ. A photosite accumulates a signal related to the incident light during an exposure. Readout electronics then amplify and digitize that signal, producing numerical measurements from which an image is constructed.\n\nA sensor photosite is often called a pixel, but it does not always correspond directly to one full-color output pixel. Most conventional single-sensor color cameras place a color filter array over the photosites. A common arrangement is the Bayer pattern, associated with Bryce Bayer’s 1976 patent, in which repeating groups contain two green-filtered sites, one red-filtered site, and one blue-filtered site. Each site primarily measures one broad spectral component. A demosaicing algorithm estimates the missing components using neighboring measurements, yielding an RGB value at each output location.\n\nThis distinction matters when interpreting sensor resolution. A sensor with 24 million photosites may produce a 24-megapixel RGB image, but the red, green, and blue components at every output position have not all been independently measured there. Other designs use separate sensors for different colors, vertically stacked photodetectors, or different filter patterns. Monochrome sensors omit the color-filter array and avoid the associated need to interpolate color components. Camera pipelines may also crop, combine, or resample sensor measurements, changing the relationship between photosite count and delivered image dimensions.\n\nPixel pitch is the center-to-center spacing between neighboring photosites. For otherwise comparable conditions, a larger collecting area can receive more photons during an exposure. Photon arrival fluctuations contribute shot noise, whose standard deviation scales approximately with the square root of the detected photon count. If \\(N\\) photons are detected under an idealized shot-noise-limited model, the signal-to-noise ratio scales as \\(\\sqrt{N}\\). Real sensors additionally exhibit read noise, dark current, nonuniform sensitivity, saturation, and other limitations.\n\nSmall pixel pitch is therefore neither a complete measure of image quality nor automatically a disadvantage. Optical quality, total sensor area, exposure, quantum efficiency, processing, and the final output size all matter. Combining neighboring measurements through pixel binning can trade spatial sampling density for improved per-output-pixel signal. Sensor architecture also affects motion: rolling-shutter readout exposes or reads different rows at different times, whereas global-shutter operation can capture the array over a common interval. Neither behavior is specified by megapixel count alone."
    },
    {
      "heading": "Physical display pixels and subpixels",
      "text": "A display pixel is an addressable light-producing or light-modulating element. In a liquid-crystal display, electrical control changes how liquid-crystal material transmits light from a backlight through optical layers and color filters. In an organic light-emitting diode display, emissive materials generate light locally. Other display technologies use inorganic light-emitting diodes, projected light, or electrophoretic particles. Their physical mechanisms differ, but a raster interface presents them as controllable picture locations.\n\nA full-color display pixel commonly contains several subpixels. A conventional RGB stripe arrangement places red, green, and blue subpixels side by side. At ordinary viewing distances, their light is visually integrated into a perceived color. Other arrangements use additional white components, different geometric layouts, or patterns in which the relationship between nominal pixels and color emitters is more complex. Thus, two displays with identical advertised pixel dimensions need not have identical subpixel structures or equal resolving behavior for every color pattern.\n\nPixel pitch and fill factor influence appearance. Pitch is the distance between corresponding points in adjacent pixels; fill factor describes how much of the nominal area actively emits or transmits light. Non-emitting boundaries can produce a visible grid, especially under magnification or in virtual reality headsets. Optical diffusion, subpixel geometry, viewing distance, and magnification determine how noticeable that grid becomes. A display’s pixel count alone does not describe its brightness, contrast, color gamut, viewing-angle behavior, or response speed.\n\nNative resolution is the physical array size of a fixed-pixel panel. Sending an image with different dimensions usually requires scaling before it can be shown. A one-to-one mapping can preserve sample alignment, while noninteger scaling mixes source values across destination pixels. Older cathode-ray-tube displays behave differently: although the input can be sampled digitally, the electron beam scans a phosphor-coated surface rather than addressing a fixed rectangular array of independently wired cells. Phosphor patterns and beam characteristics affect detail, but should not be equated directly with a modern panel’s native pixels.\n\nDisplays also have temporal characteristics. A refresh rate of 120 hertz means the display can update its presentation 120 times per second under the relevant operating conditions; it does not mean every pixel instantaneously reaches its requested brightness. Liquid-crystal response, emissive driving schemes, scanning order, and persistence influence moving-image appearance. A pixel can therefore be analyzed in time as well as space. Stuck pixels, dead pixels, and defective subpixels are hardware faults associated with particular components, distinct from corrupted pixel values in an image file."
    },
    {
      "heading": "Resolution, density, and visible detail",
      "text": "An image’s pixel dimensions specify the number of samples across and down. Their product gives the total pixel count:\n\n\\[N=W H.\\]\n\nA \\(3840\\times2160\\) image contains 8,294,400 pixels, commonly described as about 8.3 megapixels. The prefix mega here denotes one million, not \\(2^{20}\\). Pixel count is useful for describing array size and estimating storage, but it is not a complete measurement of resolved detail. Optical blur, motion, noise, interpolation, and compression can all reduce the information carried by those samples.\n\nPixel density relates count to physical size. For a display with square pixels, horizontal and vertical dimensions \\(W\\) and \\(H\\), and diagonal \\(d\\) measured in inches, density is\n\n\\[\\mathrm{PPI}=\\frac{\\sqrt{W^2+H^2}}{d}.\\]\n\nA \\(1920\\times1080\\) display with a 24-inch diagonal has approximately 92 pixels per inch. The same array on a 6-inch diagonal has approximately 367 pixels per inch. The underlying sample count is unchanged, but each physical pixel occupies much less area on the smaller screen. Viewing distance then determines the angle subtended by each pixel, which helps explain why equal pixel densities need not produce equal perceived sharpness in different uses.\n\nFor printing, pixels per inch and dots per inch describe different things. Image PPI specifies how densely source samples are placed on paper. Printer DPI specifies the addressability or marking density of the printing mechanism. A printer may use many ink dots to reproduce the tone and color associated with one image pixel. Changing only an image’s PPI metadata changes its nominal physical placement size, not the number of samples stored. A 3,000-pixel-wide image placed at 300 PPI spans 10 inches; placed at 150 PPI, it spans 20 inches.\n\nThe distinction between sampling density and actual resolution is formalized through sampling theory. Under appropriate assumptions, a band-limited signal can be reconstructed from samples taken at more than twice its highest frequency. Real images contain sharp edges and fine textures that may exceed a chosen sampling grid’s limits. Without sufficient prefiltering, these details can produce aliasing, including false patterns, jagged boundaries, and moiré. More pixels can raise the sampling limit, but cannot recover detail already removed by an inadequate lens or earlier processing.\n\nImage quality is therefore assessed with measures beyond dimensions. The modulation transfer function describes how contrast is transferred at different spatial frequencies. Noise measurements, dynamic range, color accuracy, and viewing conditions provide other information. An upscaled low-resolution image may have more output pixels without containing correspondingly more independently captured detail. Conversely, a carefully sampled, low-noise image can preserve useful information more effectively than a larger but poorly acquired one."
    },
    {
      "heading": "Resampling, filtering, and rendering",
      "text": "Geometric transformations usually require calculating pixels at locations that do not coincide with the original sample grid. Scaling, rotation, perspective correction, and image stabilization therefore rely on resampling. Nearest-neighbor interpolation selects a nearby original sample, preserving discrete values but producing blocky enlargement. Bilinear interpolation combines four neighboring samples on a rectangular grid, while bicubic and other reconstruction filters use broader neighborhoods. These methods make different trade-offs among sharpness, smoothness, ringing, computational cost, and faithful preservation of the input.\n\nReduction requires particular care. Simply retaining every second pixel can turn fine alternating patterns into false low-frequency structures. A low-pass filter applied before downsampling suppresses spatial frequencies that the smaller output grid cannot represent. Enlargement presents a different limitation: interpolation estimates additional sample values but cannot uniquely recover information absent from the input. Learned reconstruction methods may infer plausible texture using machine learning, yet inferred detail is not necessarily a faithful record of the original scene.\n\nMany local image operations use convolution or closely related neighborhood calculations. A blur replaces a value with a weighted combination of nearby values; a derivative filter emphasizes local changes; sharpening adds selected high-frequency components. For a discrete kernel \\(k\\), a two-dimensional convolution can be written as\n\n\\[g[i,j]=\\sum_m\\sum_n k[m,n]\\,f[i-m,j-n].\\]\n\nThe output depends not only on the kernel but also on boundary handling, channel interpretation, and numerical precision. Applying the same formula to nonlinear color codes rather than linear-light values can produce a visibly different result.\n\nIn three-dimensional graphics, rasterization maps projected primitives, usually triangles, to screen samples. A pixel shader computes values used in producing the final image, but one shader invocation should not be assumed to equal one final visible pixel. Depth testing, coverage, transparency, multiple render targets, and later processing can change or discard results. Ray tracing instead evaluates light transport along sampled paths through a scene; many samples may contribute to a single output pixel before averaging and reconstruction.\n\nAnti-aliasing methods address undersampling in several ways. Supersampling evaluates an image more densely and filters it down. Multisample anti-aliasing separates some coverage and shading work, especially around geometric edges. Temporal methods combine information across frames, often with deliberately shifted sample locations and motion estimates. Such techniques can reduce jaggedness and shimmer, but incorrect motion correspondence may cause ghosting. The output pixel is consequently often the result of many spatial and temporal measurements rather than a single instantaneous calculation at one geometric point."
    },
    {
      "heading": "Memory layout, file formats, and compression",
      "text": "Pixels in working memory require a defined layout. In an interleaved RGB arrangement, the channel values for each pixel are stored together; in a planar arrangement, entire component planes are stored separately. Systems also differ in channel order, integer byte order, alignment, and row padding. The stride, or row pitch, is the distance in memory between the starts of successive rows. It can exceed the visible width multiplied by bytes per pixel, so software that assumes tightly packed rows may misread an otherwise valid image.\n\nFor a tightly packed image with \\(W H\\) pixels and \\(b\\) stored bits per pixel, the nominal data size is\n\n\\[S=\\frac{W H b}{8}\\ \\text{bytes}.\\]\n\nA \\(3840\\times2160\\) image at 24 bits per pixel requires 24,883,200 bytes, approximately 24.9 megabytes or 23.7 mebibytes, before padding and metadata. A 32-bit-per-pixel representation requires 33,177,600 bytes. Repeatedly reading and writing such arrays creates substantial memory traffic, which is one reason graphics processing units and image processors are designed around high throughput and parallel computation.\n\nA file need not store an explicit uncompressed record for every pixel. PNG uses predictive filtering and lossless compression to preserve supported pixel samples exactly through encoding and decoding. Common JPEG workflows instead transform image blocks, quantize coefficients, and encode the result. This usually changes reconstructed sample values in exchange for smaller files. Compression may also subsample chrominance, retaining fewer color-difference samples than luminance samples. A displayed RGB pixel can therefore be reconstructed from coded information whose organization differs markedly from the final pixel array.\n\nFile size consequently depends on more than dimensions and nominal bit depth. A large image with broad uniform regions may compress efficiently, while fine noise often compresses poorly. Lossy compression strength introduces another variable. Metadata can describe orientation, color interpretation, physical placement, and other properties. An image stored as one array may be displayed rotated because of its orientation metadata, without rewriting the stored sample order. Color management can likewise change rendered values while preserving the original file contents.\n\nExact pixel preservation is important in some workflows but does not guarantee identical appearance. Different displays, color transforms, scaling settings, or compositing backgrounds can make the same stored values look different. Conversely, two files with different pixel values can appear similar after rendering. Engineering distinctions therefore separate file-byte identity, decoded-sample identity, and perceptual similarity. These distinctions matter in archival work, automated testing, image editing, and computer vision, where a transformation invisible to a casual viewer may still alter numerical analysis."
    },
    {
      "heading": "Logical pixels, interfaces, and specialized uses",
      "text": "Graphical interfaces frequently use a logical coordinate system independent of physical display pixels. An application can specify the size of a button in logical units while the operating system maps those units to the screen’s device pixels. This permits similar physical or perceived interface sizes across displays with different densities. At a scale factor of two, a square measuring 100 logical units on each side can occupy \\(200\\times200\\) device pixels. Fractional scale factors require additional decisions about rounding, rasterization, and filtering.\n\nOn the web, the px unit defined by CSS is not simply a hardware-pixel counter. CSS relates it to a reference pixel based on a visual angle; for screen presentation, implementations commonly map CSS pixels to device pixels according to display density and zoom. CSS also defines 96 pixels per inch within its system of absolute length relationships, but this does not force every on-screen CSS inch to measure one physical inch. A web browser can therefore render the same 800-pixel-wide layout across devices whose physical screen arrays differ substantially.\n\nFonts illustrate the interaction between geometry and pixels. Type outlines are usually described with curves and then rasterized for a particular size and display. Hinting can adjust features to the pixel grid, while grayscale anti-aliasing represents partial coverage. Subpixel text rendering can exploit separately addressable color components to improve apparent horizontal detail, but it depends on the assumed subpixel arrangement and introduces color-sensitive processing. It is therefore unsuitable for some display layouts, transformations, and compositing situations.\n\nPixel values also serve as inputs and outputs in analytical systems. In semantic segmentation, software assigns a class label to each image position; in depth estimation it predicts distance; in optical flow it estimates image-plane motion. A multispectral satellite image may associate each spatial location with several spectral measurements. Its ground sample distance describes the spacing between sample centers projected onto the ground, but does not alone establish the smallest reliably distinguishable object. Sensor response, atmosphere, reconstruction, and contrast remain relevant.\n\nIn visual art, pixel art deliberately treats the grid as a design constraint. Artists control individual sample placements, limited palettes, clusters, and edge patterns rather than merely accepting rasterization as an invisible production stage. Enlarging such work with nearest-neighbor interpolation can preserve its intended structure, whereas smoothing may alter it. In scientific imagery, a different distinction is essential: false-color mappings translate numerical values into visible colors, so the displayed pixel color is a visualization choice rather than necessarily the color of a photographed object. Interpreting either kind of image requires attention to what its pixels represent, not just to how many it contains."
    }
  ],
  "links": [
    "computer-graphics",
    "image-processing",
    "matrix",
    "bit",
    "color-space",
    "camera",
    "cmos",
    "semiconductor",
    "photon",
    "light-emitting-diode",
    "virtual-reality",
    "sampling-theorem",
    "aliasing",
    "machine-learning",
    "convolution",
    "rasterization",
    "ray-tracing",
    "anti-aliasing",
    "graphics-processing-unit",
    "parallel-computing",
    "png",
    "lossless-data-compression",
    "jpeg",
    "computer-vision",
    "operating-system",
    "cascading-style-sheets",
    "web-browser",
    "semantic-segmentation"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}