What is a Pixel (Picture Element)?
A pixel is the smallest addressable element of a raster image that holds the sample values for one point. The name is short for “picture element”.
What a pixel is
A raster image is a grid of pixels. Each pixel holds the sample values for one point of the image. A grayscale pixel holds one value. A colour pixel may hold three samples, one for each primary colour.
“Pixel” and “picture element” are the same thing. One glossary defines the term as the smallest element of an image that a video display system can process on its own.
A pixel is not a small geometric square. Smith (1995) calls it a point sample that exists only at a point. He also writes that an image is a rectilinear array of point samples. A screen can draw a pixel as a small square, but the square is only a way to draw it.
Pixel count and megapixels
The pixel count of an image is its number of pixels. Multiply the width by the height, both in pixels. An image of 4,000 by 3,000 pixels has 12,000,000 pixels.
A megapixel is one million pixels. The SI prefix mega stands for a factor of 10 to the power 6. The image above therefore has 12 megapixels.
A pixel count says how many samples an image has. It does not say how accurate those samples are.
Bit depth and colour
Bit depth is the number of unique values that one pixel can hold. An 8-bit image uses 1 byte for each pixel. A 16-bit image uses 2 bytes.
Most display systems allow 256 brightness levels in one colour channel, which is 2 to the power 8. A grayscale image of 8 bits uses this one channel.
A colour image has three channels, for red, green and blue (RGB). Three separate 8-bit values describe each pixel. The number of combinations is 256 x 256 x 256 = 16,777,216.
Memory grows with bit depth. An uncompressed 12-megapixel RGB image at 8 bits per channel has 12,000,000 pixels x 3 bytes = 36,000,000 bytes. Most image files use compression, so the file is smaller.
Pixel size on the ground
A pixel in an aerial image covers an area on the ground. The American Society for Photogrammetry and Remote Sensing (ASPRS) defines two related terms:
- Ground sample distance (GSD) is the linear size of a pixel’s footprint on the ground. The GSD of each pixel in a raw image is not uniform. It changes with terrain height and other factors. ASPRS computes it from the calibrated camera focal length and the camera height above the average terrain.
- Pixel size is the ground size of a pixel in a digital orthoimage, after all rectification and resampling.
How to calculate ground size
For a digital image, the scale is the size of one pixel on the sensor divided by the GSD. The scale also equals the focal length divided by the flying height. Combine the two:
GSD = pixel size on the sensor x flying height / focal length
Use one length unit for the pixel size and the focal length. A course at Penn State gives this example. The lens has a focal length of 100 mm and the pixel is 0.010 mm. For a ground resolution of 30 cm, the scale is 0.010 mm / 300 mm = 1/30,000. The flying height is then 100 mm x 30,000 = 3,000 m.
Check the formula the other way. 0.010 mm x 3,000 m / 100 mm = 0.3 m. The result is the same 30 cm.
A second example uses round values that are not from a named camera. Take a pixel of 0.004 mm, a lens of 8 mm and a height of 40 m. Then 0.004 / 8 x 40 = 0.02 m, so the GSD is 20 mm.
A GSD of 20 mm means that one pixel spans 20 mm on the ground, so the image scale is 20 mm per pixel. A lower flying height or a longer lens gives a smaller GSD. A larger pixel on the sensor gives a larger GSD.
Pixel size and accuracy
The ASPRS standard does not associate product accuracy with the GSD of the source images, the pixel size of the orthoimage, or the map scale. A smaller pixel size does not give a more accurate map by itself.
Common mistakes
- Treating a pixel as a square with an area. It is a sample, and only a display draws it as a square.
- Treating the megapixel count as image quality. It counts samples and does not rate them.
- Mixing up GSD and pixel size. GSD belongs to the raw image and pixel size belongs to the finished orthoimage.
- Using different length units for the pixel, the focal length and the height.
Pixels in airfield inspection
An airfield inspection with a drone produces images, so these terms apply to its results. The GSD of a lighting image depends on the camera, the lens and the height of the drone above the fixture. A fixture at a longer distance covers fewer pixels.
The ASPRS standard covers digital geospatial data in general. It does not set requirements for airfield surveys. Check which accuracy and resolution values the project or the aerodrome authority requires before you set a flight height or a pixel size.
Frequently Asked Questions
- What is a pixel?
- A pixel is the smallest addressable element of a raster image. The image is a grid of pixels, and each pixel holds the sample values for one point. A grayscale pixel holds one value and a colour pixel often holds three.
- What is the full form of pixel?
- Pixel is short for "picture element". The two names mean the same thing. A pixel is the smallest element of an image that a display system can process on its own.
- Is a pixel a small square?
- No, not in general. Alvy Ray Smith (1995) describes a pixel as a point sample that exists only at a point. A screen can draw it as a small square, but the square is only a way to draw the pixel, not the pixel itself.
- How many pixels are in a megapixel?
- A megapixel is one million pixels, because the SI prefix mega means 10 to the power 6. Multiply the width by the height in pixels to find the count. An image of 4,000 by 3,000 pixels has 12,000,000 pixels, or 12 megapixels.
- How many colours can one pixel show?
- It depends on the bit depth. Bit depth sets the number of unique values a pixel can hold. An 8-bit grayscale pixel has 256 values. A colour pixel with three 8-bit values has 256 x 256 x 256 = 16,777,216 combinations.
- What is the difference between pixel size and ground sample distance?
- Ground sample distance (GSD) is the linear size of a pixel's footprint on the ground in the raw image. Pixel size is the ground size of a pixel in the finished orthoimage, after rectification and resampling. ASPRS defines the two terms separately.
- How do I calculate the ground size of a pixel?
- Divide the pixel size on the sensor by the focal length, then multiply by the flying height. Use the same length unit for the sensor and the lens. For a 0.010 mm pixel, a 100 mm lens and a height of 3,000 m, the result is 0.3 m.
- Does a smaller pixel size give a more accurate map?
- Not by itself. The ASPRS standard does not associate product accuracy with the GSD of the source images, the pixel size of the orthoimage, or the map scale. The user and the data provider agree on the accuracy class for the project.
References
- microimages-pixel
- Glossary for Geospatial Science: picture element or pixel MicroImages
- smith-1995-pixel
- A Pixel Is Not A Little Square, A Pixel Is Not A Little Square, A Pixel Is Not A Little Square! (Technical Memo 6) Alvy Ray Smith
- serc-image-analysis
- Part 1: Digital Images and Image Files (Image analysis, advanced) Science Education Resource Center, Carleton College
- nist-si-prefixes
- Metric (SI) Prefixes National Institute of Standards and Technology (NIST)
- psu-geog892-gsd
- Geometry of Vertical Image (GEOG 892, Unmanned Aircraft Systems) Penn State, College of Earth and Mineral Sciences
- asprs-accuracy-2014
- ASPRS Positional Accuracy Standards for Digital Geospatial Data (Edition 1, Version 1.0, November 2014) American Society for Photogrammetry and Remote Sensing (ASPRS)
This is a reference entry. TarmacView provides drone inspection services and doesn't sell the equipment or materials described in this glossary.