Non-FictionInformativeEducational

Computer Vision Applications eBook

A Coursebook on Computer Vision Applications

by Pomeroy Naoma

  • English
  • 142 pages
  • 2026
  • SamEnrico

A Coursebook on Computer Vision Applications

Formats

Free sample

Chapter 1: The Lost Photon...--–- Before a computer can recognize a face, drive a car, or detect a tumor, it must first answer a deceptively simple question: What is light, and how does it become a number? This chapter follows the journey of a single photon—from the moment it leaves a light source, bounces off a physical surface, travels through a glass lens, and finally gets trapped by a silicon sensor. Along the way, that photon loses information: depth becomes color, continuous reality becomes discrete pixels, and the three-dimensional world collapses into a two-dimensional grid of numbers. Understanding what is lost is the first and most important step in building any computer vision system. Without this knowledge, every algorithm you write—no matter how sophisticated—will fail in ways you cannot predict.The Journey of a Single Photon Imagine a photon leaving the sun.

Eight minutes later, it strikes a red apple sitting on a wooden table. The apple absorbs most of the light but reflects specific wavelengths—those our eyes and cameras perceive as "red." That reflected photon now travels toward a camera lens. What happens next determines everything.Reflection is not perfect. The apple's surface is not perfectly smooth. Microscopic irregularities scatter light in many directions.

Some photons bounce directly into the lens (specular reflection), creating bright highlights. Others penetrate the apple's skin, bounce around inside, and emerge from different points (diffuse reflection), giving the apple its soft, matte appearance. A camera cannot tell these paths apart. It only records the total light arriving at each sensor pixel.The photon's journey is probabilistic. In low light, a camera might capture only a few photons from the apple.

In bright sunlight, it captures millions. The difference between "enough photons" and "not enough" determines whether your vision system sees an apple or just noise. This is not a minor implementation detail—it is a fundamental physical limit.The Pinhole Camera: The Ideal That Does Not Exist The simplest possible camera has no lens. It is a box with a tiny hole (the pinhole) on one side and a light-sensitive surface on the opposite side. Light from the scene passes through the hole and projects an inverted image onto the back wall.

This design has been known since ancient times—Chinese philosopher Mozi described it in the 5th century BCE, and Ibn al-Haytham gave the first clear scientific explanation around 1021 CE.Why the pinhole matters for you. The pinhole camera model is the mathematical foundation of almost every computer vision algorithm. It describes how a point in the 3D world (X,Y,ZX, Y, ZX,Y,Z) maps to a point on the 2D image plane (x,yx, yx,y). The relationship is pure geometry, governed by similar triangles:x=f⋅XZ,y=f⋅YZx = f \cdot \frac{X}{Z}, \quad y = f \cdot \frac{Y}{Z}x=f⋅ZX​,y=f⋅ZY​Where fff is the distance from the pinhole to the image plane (the focal length). This equation is deceptively simple.

It tells you that distant objects (large ZZZ) appear smaller on the image plane. It tells you that objects moving sideways generate predictable motion. It tells you that parallel lines in the world converge to a vanishing point in the image.But the pinhole camera has fatal flaws for real applications. The smaller the hole, the sharper the image—but also the less light enters. With a tiny pinhole, you need seconds or minutes of exposure time.

A moving car becomes a blur. A human face is unrecognizable. With a larger pinhole, you get more light but a blurry image because each point in the scene casts a circle (not a point) on the image plane. The pinhole model is mathematically elegant but physically impractical for anything requiring speed or low light.The pinhole teaches the fundamental trade-off. Every camera design faces the same tension: sharpness versus light capture.

A pinhole gives perfect sharpness at the cost of almost no light. A lens gathers more light but introduces distortions and aberrations. There is no perfect camera. Your computer vision algorithms must account for these imperfections, not pretend they do not exist.The Real Lens: Gathering Light at a Cost A lens solves the pinhole's light problem. By bending light rays through a curved piece of glass (or plastic), a lens focuses many rays from the same scene point onto a single point on the sensor.

This allows much larger apertures (the opening that lets in light) without losing sharpness. A modern smartphone lens can capture a usable image in 1/1000th of a second—millions of times faster than a pinhole camera.But lenses are not perfect. They suffer from several distortions that your vision system must correct. The most important for beginners is radial distortion:Barrel distortion: Straight lines near the edges of the image appear to bulge outward, like the surface of a barrel. Common in wide-angle lenses.Pincushion distortion: Straight lines curve inward toward the center.

Common in telephoto lenses.Mustache distortion: A combination of barrel near the center and pincushion at the edges. Common in complex zoom lenses.These distortions are not manufacturing defects—they are consequences of physics. A single-element lens cannot focus all rays from all angles to the same plane. High-end lenses use multiple glass elements to correct distortions, but they only reduce, not eliminate, the problem. Every real camera image contains radial distortion.

Your algorithms must either be robust to it or correct it explicitly.Chromatic aberration is another lens flaw. Different wavelengths (colors) of light bend by different amounts when passing through glass. A lens focuses blue light slightly closer than red light. This causes colored fringes (usually purple or green) to appear around high-contrast edges, especially near the image corners. Most digital cameras correct this internally, but low-cost cameras (like those in Raspberry Pi modules) may leave significant chromatic aberration in the raw image.Depth of field limits what is sharp.

A lens focuses light from a specific distance. Objects at that distance appear perfectly sharp. Objects closer or farther appear increasingly blurry. This depth of field effect is often desirable in photography (blurring the background to highlight a subject) but is a problem for computer vision. If your system needs to detect objects at varying distances, a single focus setting will leave some objects blurry.

Some cameras offer autofocus, but autofocus takes time—too slow for real-time applications like autonomous driving.The lens teaches you that data is never perfect. Every image entering your vision system has been warped, colored, and blurred by the lens. Chapter 4 will teach you how to measure and correct these distortions through camera calibration. For now, remember this: the camera lies. Your job is to understand the lie.The Sensor: From Photons to Electrons Behind the lens sits the sensor—a silicon chip divided into millions of tiny light-sensitive cells called photosites (or pixels, in common but technically imprecise language).

When photons strike a photosite, they knock electrons loose. The number of liberated electrons is proportional to the number of photons (over a wide range). The sensor then measures the electrical charge in each photosite and converts it to a number.This…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

A Coursebook on Computer Vision Applications

Details

Author
Pomeroy Naoma
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Informative, Educational
Released
2026-06-02
Pages (approx.)
142
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Pomeroy Naoma

See all

You may also like

See all