Part 5 · Article 1 Stage 2 · How modern AI works

HOW A COMPUTER SEES A PHOTO

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

01

Zoom In Until the World Turns Into Tiny Colored Tiles

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!

02

Grayscale: One Grid of Brightness (0 to 255)

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 a Single Light Ray Becomes a Computer Vision Input
Light Hits Camera Sensor Measured as Voltage Digitized to 0–255 Grid Fed Into Vision Model
COLOR CHANNELS & MEDICAL SCANSWhy everyday photos stack three grids—and why CT and MRI scans go way beyond 0–255
03

Color Photos: Three Stacked Grids (Red, Green, Blue)

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)!

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!

Hospital DICOM Scan (12- to 16-Bit)

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].

04

Medical Imaging Goes 3D: Hounsfield Units, Voxels, and Windowing

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!

How Much Data Lives Inside Different Images?
Handwritten Digit (MNIST 28×28)
784 Numbers
Standard AI Vision Input (224×224 RGB)
150,528 Numbers
Chest X-Ray (2048×2048 Grayscale)
4.2 Million Numbers
Whole-Slide Biopsy Pathology Scan
10+ Billion Numbers!

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].

05

Why Tiny Pixel Changes Create Giant Headaches for Computers

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]:

  1. Lighting & Exposure Shifts: The exact same skin mole looks wildly different under warm clinic bulbs versus cool outdoor daylight.
  2. Viewpoint & Posture Changes: A patient rotated 10 degrees on an X-ray table shifts rib shadows right across the heart border.
  3. Scale & Zoom: A stop sign 100 meters away is 12 pixels wide; 5 meters away it is 400 pixels wide.
  4. Occlusion (Hidden Parts): A pedestrian half-hidden behind a parked auto-rickshaw, or a fracture partially obscured by a plaster cast.
  5. Intra-Class Variety: Two chairs—a wooden dining chair and a beanbag—share zero identical pixel shapes, yet both are "chairs."
Image FormatDimensionsNumber RangeWhere It Is Used
Grayscale PhotoH × W × 10 to 255Handwriting, basic barcodes, simple cameras
Color Photo (RGB)H × W × 30 to 255 per channelPhones, dermatology photos, self-driving cameras
CT / MRI (DICOM)H × W × Depth (3D)-1,000 to +3,000+ HUHospitals, orthopaedics, oncology, neurology
Video StreamFrames × H × W × 30 to 255 × 30 fpsEchocardiograms, laparoscopic surgery, traffic
Never feed heavily compressed WhatsApp screenshots of medical scans into a clinical AI! Compressing a 16-bit DICOM X-ray into a tiny 8-bit JPEG permanently destroys subtle density numbers and introduces blocky pixel artifacts that can hide hairline fractures.

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!

Every photo, video, and medical scan is converted into a grid of numbers (pixels or 3D voxels). Preserving clean resolution, proper bit-depth (like DICOM Hounsfield Units), and consistent lighting is the bedrock of accurate computer vision.
06

The Invisible Pre-Processing Ritual: What Happens Before the AI Even Sees Your Photo

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:

  1. Resizing & Cropping: Cameras come in wildly different shapes (4:3 phones, 16:9 dashcams, tall chest X-rays), yet many neural networks expect a fixed square grid—say, 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.
  2. Normalization (Shrinking 0–255 to 0.0–1.0): Neural network math prefers small, calm numbers centered near zero. Dividing every pixel by 255—or applying CT Hounsfield windowing—keeps gradients smooth during training.
  3. Removing Burned-In Patient Metadata: Many hospital X-rays and ultrasound frames have the patient's name, age, date, and clinic name stamped right into the top-left corner pixels! Automated cropping and text-masking scrub those pixels cleanly both to protect privacy and to stop the AI from cheating by reading the hospital's name.
  4. Color & Stain Calibration: In digital pathology and dermatology, calibrating white balance ensures a warm yellow clinic bulb doesn't trick the AI into thinking normal skin looks jaundiced or inflamed.

Think of pre-processing like washing, peeling, and measuring ingredients before cooking: invisible to the dinner guest, yet decisive for the final result.

The evidence file

Checked December 2026. Source types are labelled. Dialogue is fictional.

  1. CS231n: Image Classification & The Semantic Gap, Stanford University Course Notes, updated 2025; classic breakdown of pixels, RGB tensors, and lighting/viewpoint challenges.
  2. How Digital Camera Sensors Turn Light Into RGB Pixels, Technical Photography Guide, updated 2024; physics of photodiodes and Bayer RGB grids.
  3. DICOM Standard for Medical Imaging, NEMA / DICOM Standards Committee, updated 2025; why clinical scans require high bit-depth uncompressed pixel data.
  4. Hounsfield Units & CT Windowing, Radiopaedia Clinical Reference, updated 2025; calibrated physical density scale from air (-1000) to bone (+1000+).
  5. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images, Nature Medicine, 2019; tiling gigapixel biopsy slides for deep vision.
  6. Deep Learning (Chapter 9: Computer Vision Challenges), MIT Press, 2016; why raw pixel matching fails under occlusion, scale, and shift.
Write to ussrini.present@gmail.com
Read more: srinipresents.com