Skip to content
All apps

Pixel grid

About this app

From image to number matrix: a procedurally generated harbor sunset image can be zoomed continuously down to single-pixel level, where each cell shows its stored numeric value. Bit depth (1/4/8/24-bit RGB) is switchable live with a threshold slider, R/G/B channel toggles and a computed file size; a click pins a pixel and shows its decimal, hex and binary value.

What a digital image is

A digital image is a matrix of numbers. Each pixel stores exactly one value per colour channel, measured by an image sensor as an amount of light and turned into a number by an A/D converter. The bit depth sets how many levels can be told apart: 1 bit gives 2 levels, 4 bit 16, 8 bit 256. An RGB image with 3 × 8 bit can show about 16.7 million colours. Bit depth therefore directly sets the memory required: width × height × bits per pixel. Every further computer vision method works on this matrix.

What the app shows

A procedurally generated image of a harbour at sunset can be zoomed smoothly until it turns into a grid and finally into numbers. Bit depth can be switched between 1, 4 and 8 bit and 24-bit RGB; at 1 bit a threshold slider decides what becomes black or white. The R, G and B channels can be toggled individually, and a single channel appears as a greyscale image. The app keeps track of the memory size. Clicking pins a pixel and shows its value in decimal, hexadecimal and binary.

Try it yourself

Zoom in with the mouse wheel or two fingers until the numbers are readable. Then drop from 24 bit to 1 bit and watch gradients break into steps while the file size shrinks. Hide single channels: the sunset sky lives on the red channel, the water more on blue. Pin a pixel and compare its value in the three number systems.

Frequently asked questions

What does bit depth mean for images?
Bit depth is the number of bits stored per pixel and channel. With n bits, 2ⁿ levels can be distinguished, so 8 bits give 256 brightness values. More bits mean finer gradation and larger files.
How many colours does a 24-bit image have?
At 24 bit there are 8 bits each for red, green and blue. That gives 256 × 256 × 256 = 16,777,216 possible colours, about 16.7 million.
How large is an uncompressed image file?
The memory required is width × height × bits per pixel, divided by 8 for bytes. A 1920 × 1080 image at 24 bit needs about 6.2 MB uncompressed. Formats like PNG or JPEG reduce this through compression.
What happens when I click a pixel in the app?
The pixel is pinned and the app shows its stored value as a decimal, hexadecimal and binary number. You see exactly which number lies behind the colour.

Subject: Computer Vision

More from Computer Vision

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps