everything.study
COMP 4102

Computer Vision

0.5 credit · Undergraduate

The basic ideas and techniques of computer vision. The central theme is reconstructing 3D models from 2D images. Topics include: image formation, image feature extraction, camera models, camera calibration, structure from motion, stereo, recognition, augmented reality, image searching.

Study notes

Independent, AI-drafted study guide · Public sources linked below · Added November 5, 2026

Original guide aligned to the public Fall 2026 outline. The outline identifies course topics; explanations and exercises are independently written.

Image formation and sampling

A digital image samples a scene after optics, sensor response, and image processing have transformed incoming light. Pixel coordinates are measurements in an image frame, not direct three-dimensional world positions. Sampling can lose detail or create aliasing; blur before downsampling suppresses frequencies the coarser grid cannot represent. A convolution combines neighboring pixels with a kernel. Border handling, channel order, numeric range, and integer rounding can change results even when the high-level algorithm is correct.

References: OpenCV — Camera Calibration and 3D Reconstruction

Features and matching

A feature detector chooses distinctive locations; a descriptor summarizes the appearance around a location. Matching compares descriptors, but the closest candidate can still be incorrect, particularly in repeated textures. Geometric verification adds a model-based consistency check. Separate invariance to translation, rotation, and scale from robustness to noise or illumination. A transformation that helps one task can remove useful information for another. Evaluate correspondences with representative images rather than assuming an attractive visualization means they are correct.

References: OpenCV — Camera Calibration and 3D Reconstruction

Camera models and projective geometry

The pinhole model relates a three-dimensional point to an image point using camera intrinsics and extrinsics. Intrinsics describe quantities such as focal scale and principal point; extrinsics describe the camera's pose relative to a world frame. Homogeneous coordinates express projective mappings up to nonzero scale. A homography describes a planar projective mapping under suitable scene or camera-motion assumptions. It cannot generally explain arbitrary parallax from a nonplanar scene viewed after translation.

References: OpenCV — Camera Calibration and 3D Reconstruction

RANSAC and a worked iteration estimate

RANSAC repeatedly fits a model to a minimal nondegenerate random sample, then counts data consistent with that model under a residual threshold. It is useful when correspondences contain outliers. If a model needs four points and each sampled point is independently an inlier with probability 0.5, a sample is all-inlier with probability 0.5^4 = 0.0625. Requiring 99% chance of at least one clean sample gives N >= log(0.01)/log(0.9375), or 72 iterations after rounding up. Independence and inlier-fraction assumptions matter.

References: OpenCV — Camera Calibration and 3D Reconstruction

Stereo, epipolar geometry, and motion

Two camera views constrain corresponding points through epipolar geometry. Rectification can align corresponding epipolar lines and simplify disparity search. In a simplified rectified stereo setup, depth is proportional to focal length times baseline divided by disparity, so small disparity errors can produce large depth errors for distant objects. Optical flow estimates image motion, which mixes camera movement, object movement, depth, and appearance effects. Brightness constancy is an approximation, especially under lighting changes or occlusion.

References: OpenCV — Camera Calibration and 3D Reconstruction

Segmentation, learning, and evaluation

Segmentation assigns labels to regions or pixels; recognition may assign a category to an image or object. Neural networks learn representations but still depend on training distribution, annotation quality, and a suitable objective. Separate training, validation, and test imagery by relevant groups to avoid near-duplicate leakage. Report the metric appropriate to the task: pixel accuracy may conceal failure on a small foreground object, while intersection-over-union measures overlap. Inspect failure cases involving occlusion, scale, lighting, and unfamiliar scenes.

References: OpenCV — Camera Calibration and 3D Reconstruction

Practice & worked answers

Original exercises for this guide.

1. Why does fitting a homography to all feature matches sometimes produce a poor result?

Show worked answer

Least-squares fitting can be pulled strongly by outliers, and a single homography may also be an invalid model for the scene. Use robust fitting plus residual inspection, and confirm that planar-scene or camera-motion assumptions justify the model.

2. If disparity halves in a rectified stereo model with fixed focal length and baseline, what happens to depth?

Show worked answer

Depth doubles because Z = fB/d. This inverse relationship also explains why a one-pixel disparity error has a larger depth effect when disparity is already small.

Public notes & references

Course sources establish the scope above. Reference materials support the explanations; linked lecture notes and books remain with their authors.

2026

Topics

  • Digital image formation and processing
  • Detection and analysis of visual features
  • Homography
  • RANSAC
  • Neural networks
  • Stereo
  • Epipolar
  • Optical flow
  • Segmentation
  • Applications

Prerequisites & course information

Prerequisite(s): ( COMP 2404 or SYSC 3010 or SYSC 3110 ) and ( MATH 1104 or MATH 1107 ). Lectures three hours a week.

Sources