Everyday JPEG Photo (8-Bit RGB)
Three channels (R, G, B), each 0–255. Compressed by throwing away subtle details human eyes barely notice—great for WhatsApp, terrible for delicate medical diagnostics!
Part 5 · Article 1 Stage 2 · How modern AI works
Pixels, RGB channels, 3D medical voxels, and why your phone's prettiest sunset is really a giant spreadsheet of brightness numbers.
About 13–15 minutes
Take any crisp photograph on your phone—a smiling grandchild, a rainy street in Mysuru, or a standing knee X-ray from an orthopaedics clinic—and pinch-zoom in as far as the screen allows. Keep zooming. Suddenly, smooth eyelashes, wet asphalt, and bone edges shatter into tiny, rigid square mosaic tiles. Those tiles are pixels (short for "picture elements") [1].
To your human eye, a photograph is a continuous scene filled with objects, depth, sunlight, and emotion. To a computer, there is no grandchild, no rainy street, and no knee joint. There is only a gigantic rectangular ledger of numbers—one number per tile in a black-and-white scan, or three numbers per tile in a color photograph.
Understanding how light physically turns into numbers—and what gets gained or lost along the way—explains almost every superpower and weird blind spot of modern computer vision.
ZappyWait—when my phone says it has a 12-megapixel camera, does that literally mean every single snapshot creates 12 million tiny square tiles?
Prof. BoltEven wilder, Zappy! Because each color tile stores three separate numbers—Red, Green, and Blue—a single 12-megapixel photo of your lunch is actually a spreadsheet of 36 million numbers!
Start with the simplest possible image: a standard black-and-white (grayscale) photo. Every single pixel gets one integer measuring how bright it is, usually on an 8-bit scale from 0 (pitch black, zero light) to 255 (pure dazzling white), with 254 smooth shades of gray in between.
Why 255 instead of a tidy 100? Because computers count in binary (powers of two), and one standard byte of computer memory holds 8 binary switches ($2^8 = 256$ possible values, numbered 0 through 255). Picture a tiny 5 × 5 grid showing a white capital letter "T" on a black background: the top row reads [255, 255, 255, 255, 255], and the middle column below it reads [0, 0, 255, 0, 0] all the way down. To a computer, recognizing that letter "T" simply means spotting a bright horizontal bar sitting atop a bright vertical bar.
Now scale that up to a real digital chest X-ray: roughly 2,048 pixels tall by 2,048 pixels wide—over 4.1 million brightness numbers. Dark air-filled lungs sit near low numbers; fluid or pneumonia clouds push those numbers upward into hazy grays; dense ribs and titanium joint implants glow near the top of the scale.
How do computers capture every sunset orange, emerald leaf, and skin-lesion shade using only plain numbers? They borrow a trick straight from the human retina! Your eye has three types of color-sensing cone cells—tuned roughly to Red, Green, and Blue light—and mixes those three signals to invent millions of colors.
A digital color photo does the exact same thing by storing three stacked grids (called Channels) for every image: a Red grid (0–255), a Green grid (0–255), and a Blue grid (0–255) [2]. Mix them together and any color appears:
(255, 0, 0) = Pure fire-engine Red(255, 255, 0) = Bright comic Yellow (Red + Green light!)(255, 255, 255) = Pure White (all three lamps full blast)(0, 0, 0) = Pure Black (all three lamps switched off)In machine learning lingo, a single grayscale image is a 2D matrix (Height × Width), while a color photo is a 3D Tensor (Height × Width × 3 Channels). And a video? Simply 30 color tensors stacked per second—creating a 4D block of numbers (Time × Height × Width × 3)!
Three channels (R, G, B), each 0–255. Compressed by throwing away subtle details human eyes barely notice—great for WhatsApp, terrible for delicate medical diagnostics!
Uses 4,096 to 65,536 shades of gray instead of 256! Preserves microscopic tissue contrast inside lungs, brains, and bones that ordinary JPEG compression would permanently smudge away [3].
Medical vision has a fascinating secret that separates hospital AI from cat-photo AI: a CT scan does not store arbitrary "brightness"—it stores calibrated physical tissue density!
Every tiny 3D cube in a CT scan—called a voxel (volume element)—is measured in Hounsfield Units (HU), named after Nobel laureate Godfrey Hounsfield [4]. Water is calibrated to exactly 0 HU. Pure air inside the lungs sits at -1,000 HU. Body fat sits around -100 HU. Soft muscle and organs sit around +30 to +60 HU. Dense cortical bone sits at +700 to +1,500 HU, and metal joint implants shoot past +3,000 HU!
Because the human eye can only distinguish roughly 50 to 100 shades of gray at one glance—while a CT voxel spans 4,000+ Hounsfield numbers—radiologists use a trick called Windowing: sliding a contrast bracket to view only the "Lung Window" (highlighting airy tissue) or switching to the "Bone Window" (highlighting tiny fractures). Medical AI models often feed three different clinical windows simultaneously as three channels—just like Red, Green, and Blue—so the neural network sees lungs, soft tissue, and bone all at once!
A single digital cancer biopsy slide is so gigantic (100,000 × 100,000 pixels) that AI must chop it into thousands of tiny mosaic tiles just to fit into GPU memory [5].
Pause and appreciate how insanely hard "seeing" really is when all you get is a grid of numbers. Look at a coffee mug on your desk. Now turn off the overhead lamp, step two feet to the left, and hold a pen in front of half the mug. Your brain doesn't even blink—it still screams "Coffee mug!" instantly.
Yet inside the computer's pixel spreadsheet, every single one of the 3 million numbers just changed completely! Dimming the room subtracted 80 from every pixel. Stepping left shifted every number into a new column. Holding a pen in front replaced mug pixels with pen pixels. Computer vision researchers list five classic hurdles that make pixel math so tricky [6]:
| Image Format | Dimensions | Number Range | Where It Is Used |
|---|---|---|---|
| Grayscale Photo | H × W × 1 | 0 to 255 | Handwriting, basic barcodes, simple cameras |
| Color Photo (RGB) | H × W × 3 | 0 to 255 per channel | Phones, dermatology photos, self-driving cameras |
| CT / MRI (DICOM) | H × W × Depth (3D) | -1,000 to +3,000+ HU | Hospitals, orthopaedics, oncology, neurology |
| Video Stream | Frames × H × W × 3 | 0 to 255 × 30 fps | Echocardiograms, laparoscopic surgery, traffic |
ZappySo computers don't actually "see" anything at all—they stare at giant spreadsheets of brightness numbers that scramble completely every time the lighting changes!
Prof. BoltExactly! And that sets up our next big question: how do you find a face, a road sign, or a hairline fracture inside a shifting spreadsheet of 4 million numbers? Meet the sliding magnifying glass—Convolution!
Before a raw smartphone snapshot or hospital DICOM scan ever enters Layer 1 of a neural network, it goes through a quiet four-step grooming ritual called Image Pre-Processing. Skipping any one of these steps is a classic reason real-world vision models suddenly behave weirdly:
512 × 512 pixels. Squashing a tall chest X-ray carelessly into a short square can make a normal heart look abnormally wide (mimicking cardiomegaly!), so medical pipelines pad the borders neatly instead of distorting anatomy.Think of pre-processing like washing, peeling, and measuring ingredients before cooking: invisible to the dinner guest, yet decisive for the final result.
Checked December 2026. Source types are labelled. Dialogue is fictional.