BS Artificial Intelligence and BSCS students can use this guide to study “Computer Vision: Algorithms and Applications” (2nd Edition) by Richard Szeliski. Springer published the second edition in 2022, and the author offers the book as a free PDF on his book page. That PDF is his final draft dated September 30, 2021, so the content matches the print book but the page numbers do not. It is not an open-licence book: Springer holds the copyright, and the author allows personal use only.
The book is a full computer vision course in one volume. It starts with image formation and image processing, adds optimization, deep learning and recognition, then covers features, image stitching, motion, computational photography, structure from motion, stereo, 3D reconstruction and image-based rendering. It is long, about 1,230 PDF pages, and it assumes linear algebra, image processing basics and programming, with calculus and probability throughout. Chapters 2 to 14 end with implementation exercises, so it works best as a project-based course text rather than a quick revision guide. Final-year BS AI students can use Chapters 5 and 6 as a bridge from machine learning to vision.
Book Overview
| Course | Computer Vision |
| Degree Programs | BS Artificial Intelligence, BS Computer Science (BSCS) |
| Level | Senior undergraduate / graduate |
| Edition | 2nd edition (Springer, 2022); the free PDF is the author’s final draft dated September 30, 2021 |
| Author | Richard Szeliski |
| Publisher | Springer (Texts in Computer Science), 2022; ISBN 978-3-030-34371-2 (hardcover), 978-3-030-34372-9 (eBook) |
| Prerequisites | As the book states: an image processing or computer graphics course first (preface), and general familiarity with linear algebra and numerical techniques (Section 1.6) |
| Total Chapters | 15 chapters plus 3 appendices (A: Linear algebra and numerical techniques, B: Bayesian modeling and inference, C: Supplementary material), followed by references and an index |
| Exercises | End-of-chapter exercises in Chapters 2–14, about 172 in all, mostly implementation projects; no solutions in the PDF |
| Language | English |
| Format | PDF — about 1,232 pages (about 43 MB) in the author’s final-draft layout; the author’s page asks for a name and e-mail address before the download |
Chapter List
This page describes the second edition as the author’s free final draft (dated September 30, 2021). The book has 15 chapters and three appendices; each chapter below has its own summary, key points and two exam-style questions. Chapters 2 to 14 end with implementation exercises, which are not reproduced here.
Chapter 1: Introduction
Difficulty: Easy · Key topics: inverse problem, applications, history of vision, Marr’s levels, chapter roadmap, sample syllabus, notation
The chapter defines computer vision as the inverse of computer graphics: instead of rendering an image from objects, lights and cameras, it tries to recover shape, illumination and colour from images, a job that people underestimate because human vision feels effortless. Section 1.1 lists industrial uses such as OCR, machine inspection, medical imaging, self-driving and match move, then consumer uses such as panoramas, HDR and face detection, and explains the author’s engineering, scientific and statistical viewpoints. Section 1.2 walks through the field decade by decade, from the 1970s blocks world to the deep learning boom of the 2010s. Sections 1.3 to 1.6 give a chapter tour, a sample syllabus and the notation.
Key Points:
- Computer vision is an inverse problem: graphics goes from objects, lights and cameras to an image, and vision goes from images back to shape, illumination and colour.
- Marr’s three levels of description are computational theory (the goal and its constraints), representations and algorithms, and hardware implementation.
- The history runs by decade: line labelling and blocks world in the 1970s, pyramids and regularization in the 1980s, structure from motion and graph cuts in the 1990s, computational photography in the 2000s and deep learning in the 2010s.
- The SuperVision network (AlexNet) was the first neural network to win the yearly ImageNet challenge, helped by large labelled datasets and GPU training.
- Figure 1.12 arranges Chapters 2 to 14 on an image-to-3D axis and shows their dependencies, so the book does not have to be read in order.
- Notation: vectors are lower-case bold, matrices are upper-case bold, and vectors are columns that matrices post-multiply, as in
Mv.
Memory Tip: Graphics runs forward (scene to image) and vision runs backward (image to scene). When a later chapter feels abstract, ask which forward process is being inverted.
Common Mistake: Assuming vision must be easy because people do it without effort. The chapter notes that early AI researchers made the same mistake and that the problem turned out to be far harder than the reasoning tasks they started with.
Important Questions:
- Why is computer vision called an inverse problem? Graphics simulates an image from known objects, cameras and lighting, while vision starts from the image and estimates the scene that produced it, which usually has many possible answers unless priors or extra constraints are added.
- Which development started the deep learning era in vision? The 2012 SuperVision (AlexNet) network, which won the ImageNet challenge using large labelled datasets and GPU training and led to convolutional networks becoming the standard for recognition.
Chapter 2: Image formation
Difficulty: Medium · Key topics: homogeneous coordinates, 2D and 3D transformations, quaternions, camera matrix, lens distortion, BRDF, thin lens, Bayer filter, aliasing, JPEG
Image formation is split into geometry, light and sensors. Section 2.1 introduces points, lines and planes in homogeneous coordinates, the hierarchy of 2D and 3D transformations from translation to projective, rotation representations including Rodrigues’ formula and unit quaternions, projection models from orthography to perspective with the calibration matrix, and radial lens distortion. Section 2.2 covers light sources, the BRDF, diffuse, specular and Phong shading, and thin-lens optics with depth of field and aberrations. Section 2.3 follows the signal through the digital camera: CCD and CMOS sensors, sampling and aliasing, colour spaces, the Bayer filter, gamma and JPEG-style compression.
Key Points:
- Homogeneous coordinates turn translation and projection into matrix products, and the cross product of two points gives the line through them (or of two lines, their intersection).
- The 2D hierarchy runs translation (2 degrees of freedom), rigid (3), similarity (4), affine (6) and projective or homography (8); each step preserves fewer properties such as lengths, angles and parallelism.
- Unit quaternions represent 3D rotations;
qand-qgive the same rotation, and composing rotations is quaternion multiplication, which is not commutative. - A camera maps a 3D point to pixels using the calibration matrix
K(focal length, image centre) and the poseR,t; focal length and field of view are linked byf = (W/2) / tan(theta/2). - Radial distortion comes as barrel, pincushion or fisheye, and ignoring it blurs mosaics because corresponding features no longer line up.
- The thin lens law is
1/zo + 1/zi = 1/f; a misfocused point becomes a circle of confusion, and light reaching a pixel falls off with the fourth power of the cosine of the off-axis angle. - Sine waves at frequencies 3/4 and 5/4 sampled at 2 give identical samples, which is the classic picture of aliasing; image codecs convert to YCbCr, subsample colour and apply a block transform.
Memory Tip: Picture the camera as a chain: world, then camera frame (R, t), then image plane (K), then pixels. Each arrow is one matrix, and calibration means finding those matrices.
Common Mistake: Forgetting to divide by the last homogeneous coordinate after applying a homography or projection matrix. Until you divide, the numbers are not pixel positions.
Important Questions:
- Why do vision systems use homogeneous coordinates? Plain 2D or 3D coordinates cannot express translation as a matrix, but homogeneous ones can, so translation, rotation, scaling and perspective projection all become matrix products that can be chained and inverted.
- What is the difference between intrinsic and extrinsic camera parameters? Intrinsics (focal length, image centre and pixel aspect, collected in
K) describe the camera itself, while extrinsics (rotationRand translationt) place it in the world.
Chapter 3: Image processing
Difficulty: Medium · Key topics: point operators, histogram equalization, convolution, separable filters, bilateral filter, morphology, Fourier transform, pyramids, wavelets, warping, morphing
This chapter is the toolbox of image processing operators. It starts with point operators (gain, bias, gamma, colour transforms, alpha compositing and histogram equalization), then neighbourhood operators: linear filtering by convolution, separable and steerable filters, and non-linear tools such as the median, bilateral and guided filters, binary morphology and distance transforms. Section 3.4 uses Fourier analysis to understand filters and the FFT to speed up large kernels. Section 3.5 covers interpolation, decimation, Gaussian and Laplacian pyramids and wavelets, with pyramid blending as an application. The chapter closes with geometric warping, mesh-based warps and feature-based morphing.
Key Points:
- The basic point operator is
g(x) = a f(x) + b, whereais the gain (contrast) andbthe bias (brightness); gamma correction is a non-linear point operator. - Compositing blends a foreground and background with an alpha matte:
C = (1 - alpha) B + alpha F. - Histogram equalization remaps intensities with the cumulative distribution; locally adaptive versions work on blocks, and the gain-limited version is known as CLAHE.
- A separable kernel is a product of a horizontal and a vertical 1D kernel, so a 2D filter becomes two cheap 1D passes; the Sobel operator and the Gaussian are separable.
- The median filter removes shot noise, and the bilateral filter weights neighbours by both distance and similarity of value, so it smooths without blurring strong edges.
- The FFT makes large-kernel convolution cost independent of the kernel size, and a distance transform needs only a forward and a backward raster sweep.
- A Laplacian pyramid stores the differences between Gaussian pyramid levels; blending each level separately hides seams, as in the apple and orange example. Inverse warping, which samples the source for each output pixel, avoids the holes of forward warping.
Practice Tip: Add salt-and-pepper noise to a photo in Python and compare a Gaussian blur, a median filter and a bilateral filter (OpenCV has all three). You will see the median filter win on shot noise and the bilateral filter keep edges sharp.
Common Mistake: Ignoring the image border. Zero padding darkens the edges of a blurred image, so choose replicate or reflect padding, or normalise by the padded weight, as the chapter’s border example shows.
Important Questions:
- Why does the bilateral filter preserve edges while a Gaussian blur does not? Gaussian weights depend only on pixel distance, so values from both sides of an edge are averaged, while the bilateral filter also multiplies by a range weight that is small when a neighbour’s value differs a lot, so pixels across the edge barely contribute.
- Why must an image be low-pass filtered before downsampling? Without filtering, frequencies above the new Nyquist limit fold back as aliasing, so decimation convolves with a low-pass filter first and then drops samples.
Chapter 4: Model fitting and optimization
Difficulty: Hard · Key topics: scattered data interpolation, radial basis functions, regularization, bias-variance, robust loss, total variation, Markov random fields, graph cuts, GrabCut
The chapter asks how to fill in a complete image, depth map or label field from sparse or noisy data. Section 4.1 covers scattered data interpolation with triangulation, splines and radial basis functions, then overfitting, regularization, cross-validation, the bias-variance trade-off and robust loss functions. Section 4.2 treats ill-posed problems with variational methods: thin-plate smoothness, discrete energy minimization, total variation, the bilateral solver and interactive colorization. Section 4.3 introduces Markov random fields as a Bayesian model whose energy is minimized with graph cuts or loopy belief propagation, extends them to conditional random fields and ends with GrabCut interactive segmentation.
Key Points:
- Interpolation forces a function through the data points, while approximation only asks it to pass near them, which is what noisy data needs.
- Regularization adds a penalty to the data term; a quadratic penalty on the weights is ridge regression, and its strength is chosen with held-out validation or cross-validation.
- Heavy regularization raises bias and light regularization raises variance, which is the bias-variance trade-off.
- Robust (M-estimator) losses limit the influence of outliers, and the general adaptive loss has a shape parameter that reproduces several well-known losses.
- First-order smoothness can be drawn as a graph with data nodes and unknown nodes; a second-order smoothness term gives the thin-plate spline.
- In a Markov random field the probability is a Gibbs distribution, so the most likely labelling is the one with the lowest energy (data term plus neighbour smoothness).
- Multi-label MRFs are solved by repeated binary graph cuts (swap and expansion moves) or by loopy belief propagation; GrabCut starts from a user box, models foreground and background colours, and iterates graph cuts.
Practice Tip: Sample a sine curve with noise and fit polynomials of degree 0, 1, 3 and 9, then add a ridge penalty and plot the training and validation errors. You will see overfitting appear and then disappear as the penalty grows.
Common Mistake: Choosing the smoothness weight by minimising the training error. That always picks too little regularization, so use data you did not fit.
Important Questions:
- What is overfitting and how does regularization help? An overly flexible model matches the noise in the training data and generalises poorly; a penalty on roughness or large weights restricts the model so it follows the trend instead.
- Why can many vision problems be written as energy minimization? In an MRF the posterior is a Gibbs distribution, so finding the most probable labelling is the same as minimising an energy made of a data term and a smoothness term between neighbouring pixels.
Chapter 5: Deep learning
Difficulty: Medium · Key topics: supervised and unsupervised learning, SVM, k-means, PCA, neural networks, backpropagation, CNNs, ResNet, transformers, GANs
This new chapter builds up machine learning for vision. Section 5.1 reviews supervised methods: nearest neighbours, Bayesian classifiers, logistic regression, support vector machines and decision forests. Section 5.2 covers k-means, Gaussian mixtures, PCA and eigenfaces, manifold learning and semi-supervised learning. Section 5.3 builds feed-forward networks from weights, layers, activations, regularization and normalization, loss functions, backpropagation and optimizers such as SGD, momentum and Adam. Section 5.4 turns to convolutional networks, from LeNet and AlexNet to VGG, Inception and ResNet, with visualization, adversarial examples and self-supervised learning. Section 5.5 adds 3D CNNs, recurrent networks, transformers and generative models.
Key Points:
- Classic pipelines use hand-designed features followed by a learned classifier; deep networks learn every stage, including the middle-level representations.
- A support vector machine picks the separating hyperplane with the largest margin to the nearest training examples.
- k-means alternates between assigning samples to the nearest centre and recomputing centres, and a Gaussian mixture fitted with EM does the same with soft assignments.
- A softmax layer turns network scores into class probabilities; ReLU and its variants are the common activations; dropout and batch, layer, instance and group normalization help training.
- Backpropagation applies the chain rule layer by layer, and training uses minibatch SGD, often with momentum, Adam or AdamW.
- Convolution shares one small filter across the whole image; ResNet adds skip connections, Inception mixes filter sizes, and U-Net pairs an encoder and decoder with skips for dense outputs.
- Transformers use self-attention, the Vision Transformer cuts an image into patches, GANs train a generator against a discriminator, and tiny adversarial perturbations can flip a network’s answer.
Practice Tip: Train a small LeNet-style CNN on MNIST in PyTorch, then plot the first-layer filters and the training and validation curves. The TensorFlow playground mentioned in the chapter is also a quick way to feel how layers and activations change a decision boundary.
Common Mistake: Judging a network by its training accuracy. With enough weights it can memorise the training set, so always keep a separate validation set.
Important Questions:
- Why are convolutional layers better suited to images than fully connected layers? A convolutional layer applies the same small filter at every position (weight sharing) and only looks at a local neighbourhood, so it has far fewer parameters and detects a pattern wherever it appears.
- What does a ResNet skip connection do? It adds a block’s input to its output, so the block only has to learn a residual correction, which makes very deep networks much easier to train.
Chapter 6: Recognition
Difficulty: Medium · Key topics: instance recognition, bag of words, face recognition, face and pedestrian detection, R-CNN, IoU and average precision, segmentation, video understanding, vision and language
Recognition moved up from the last chapter of the first edition because deep networks now learn what used to be separate stages. The chapter starts with instance recognition, finding a known object by matching features and checking geometry, then image classification with bag-of-words and deep networks, visual similarity search and face recognition. Object detection runs from Viola-Jones faces and HOG pedestrians to R-CNN, feature pyramids and YOLO, scored by IoU and average precision. It then covers semantic, instance and panoptic segmentation, pose estimation, video understanding and vision-and-language work such as captioning, CLIP and text-to-image generation.
Key Points:
- Instance recognition finds one specific manufactured object, such as a stop sign; category recognition handles any member of a variable class, such as cats.
- A bag-of-words classifier extracts local features, quantises them into visual words, builds a histogram and classifies it; deep networks have largely replaced this pipeline.
- The Viola-Jones face detector boosts many simple rectangle-difference features that are cheap to compute; HOG features with a classifier were the standard for pedestrian detection.
- IoU is the area of overlap divided by the area of union of a predicted and a true box; average precision is the area under the precision-recall curve, reported on benchmarks such as COCO.
- R-CNN classifies each proposed region, Fast R-CNN shares computation, feature pyramid networks add multi-scale features, and YOLO-style detectors trade some accuracy for speed.
- Semantic segmentation labels every pixel with a class, instance segmentation (Mask R-CNN) separates individual objects, and panoptic segmentation labels both countable things and background stuff.
- Vision-and-language models learn from image and text pairs for captioning, question answering and text-to-image generation, and can be fooled by typographic attacks.
Practice Tip: Load a pre-trained classifier and a pre-trained detector from a model zoo, run both on your own photos, then rotate, darken or crop the images and watch which predictions fail first.
Common Mistake: Mixing up the tasks. Classification, detection and the three kinds of segmentation produce different outputs and use different metrics, so an accuracy figure for one cannot be compared with average precision for another.
Important Questions:
- What is IoU and how does it score a detector? Intersection over union divides the overlap area of the predicted and ground-truth boxes by their union; a detection counts as correct above a chosen IoU threshold, and the resulting hits and misses give the precision-recall curve behind average precision.
- How does panoptic segmentation differ from instance segmentation? Instance segmentation outlines each countable object separately, while panoptic segmentation also labels uncountable stuff such as sky and road, so every pixel gets exactly one label.
Chapter 7: Feature detection and matching
Difficulty: Medium · Key topics: corners, Harris detector, DoG and scale space, SIFT, descriptors, nearest-neighbour matching, k-d trees, edges, Hough transform, vanishing points, segmentation
The chapter surveys the features that matching and alignment are built on. Section 7.1 explains why corners are easier to localise than edges or flat patches, then covers the Harris and DoG detectors with scale selection, descriptors such as SIFT, GLOH and binary strings, matching evaluation with ROC curves and distance-ratio tests, k-d trees and visual words for retrieval, and feature tracking. Sections 7.2 and 7.3 cover edge detection, contours, snakes, intelligent scissors and level sets. Section 7.4 covers Hough transforms and vanishing points, and Section 7.5 covers graph-based, mean-shift and normalized-cuts segmentation.
Key Points:
- The aperture problem: a patch on a straight edge can only be shifted along the edge without changing, so only corner-like patches localise well; the eigenvalues of the auto-correlation matrix tell the cases apart.
- The Harris detector and the difference-of-Gaussians (DoG) detector find keypoints, and running them over an image pyramid gives scale-invariant features; adaptive non-maximal suppression spreads the points evenly.
- SIFT describes a keypoint with histograms of gradient orientations on a grid around it, after normalising scale and dominant orientation; GLOH uses log-polar bins and BRIEF uses short binary strings.
- Matching is judged with true and false positive rates (ROC curve), and the nearest-neighbour distance ratio works better than a fixed distance threshold.
- For large databases, k-d trees with best-bin-first search speed up nearest-neighbour lookup, and visual words turn local features into an inverted index for retrieval.
- The Hough transform lets each edge point vote for all lines through it in a parameter space, and the intersections of detected lines give vanishing points.
- Graph-based merging, mean shift and normalized cuts are three classic ways to segment an image into regions.
Practice Tip: Detect SIFT or ORB keypoints in two photos of the same building taken from different positions, match them with the distance-ratio test and draw the matches. Then loosen the ratio and watch wrong matches appear.
Common Mistake: Matching with one fixed distance threshold. Distinctive features and repetitive ones need different thresholds, which is why the ratio of the best to the second-best match is used instead.
Important Questions:
- Why are corners better features than edges or flat regions? A flat patch is the same everywhere and an edge patch slides along the edge unchanged (the aperture problem), while a corner changes in every direction, so its position can be found accurately in both images.
- What does the nearest-neighbour distance ratio test do? It compares the distance to the closest descriptor with the distance to the second closest and accepts the match only if the first is clearly smaller, which rejects ambiguous matches.
Chapter 8: Image alignment and stitching
Difficulty: Medium · Key topics: least squares alignment, RANSAC, homography, rotational panoramas, bundle adjustment, recognizing panoramas, compositing, blending
Image alignment starts with matched features and asks which transformation explains them. Section 8.1 solves 2D alignment with least squares, extends it to iterative non-linear models using Jacobians, and makes it robust with RANSAC and robust least squares before touching 3D alignment. Section 8.2 turns this into stitching: planar and parametric models, whiteboard scanning, rotational panoramas whose homography depends only on rotation and focal length, gap closing and cylindrical or spherical projection. Section 8.3 refines all cameras together with bundle adjustment, removes parallax and recognizes which photos form a panorama. Section 8.4 covers compositing: choosing a surface, deghosting, photomontage and blending.
Key Points:
- Linear least squares aligns matched points by minimising squared distances; richer motion models need iteration using the Jacobian of the transformation.
- RANSAC repeatedly fits a model to a minimal random sample of matches and keeps the model with the most inliers; the number of trials needed grows quickly with the outlier rate and the sample size.
- For a camera that only rotates, images are related by a homography that depends only on the rotation and the focal length.
- If the focal length is wrong, a 360-degree panorama does not close, and gap closing spreads the error around the loop.
- Bundle adjustment refines all camera parameters together to minimise the error over every match, and panorama recognition decides which images overlap before stitching.
- Compositing choices include averaging, median, feathering and deghosting by finding regions of difference; photomontage picks pixels with an MRF and graph cuts.
- Blending hides exposure differences with pyramid blending or gradient-domain (Poisson) editing.
Practice Tip: Stitch two overlapping photos in Python: match features, estimate a homography with RANSAC (OpenCV findHomography), warp one image, then compare average, median and feathered composites.
Common Mistake: Using one homography when the camera moved and the scene has depth. Parallax makes near objects ghost, so rotate the camera about its centre or shoot a flat scene.
Important Questions:
- Why is RANSAC used before least squares? A few wrong matches can ruin a least-squares fit, so RANSAC first finds the consensus set of inliers from small random samples, and least squares then refines the model on those inliers only.
- When is a single homography a valid model for stitching? When the camera rotates about its optical centre or when the scene is essentially a plane; otherwise parallax breaks the model.
Chapter 9: Motion estimation
Difficulty: Hard · Key topics: SSD and cross-correlation, coarse-to-fine search, phase correlation, Lucas-Kanade, parametric motion, optical flow, layered motion, video segmentation, tracking
Motion estimation generalises feature-based alignment to dense, intensity-based methods. Section 9.1 starts with translation: error metrics, full search, hierarchical coarse-to-fine search on pyramids, Fourier-based alignment and incremental Lucas-Kanade refinement for sub-pixel accuracy. Section 9.2 moves to parametric motion (affine and planar), video stabilization, spline-based motion and medical image registration. Section 9.3 covers optical flow, from classical regularised methods to deep networks and multi-frame estimation. Section 9.4 closes with layered motion, frame interpolation, transparent layers and reflections, and video object segmentation and tracking.
Key Points:
- The simplest alignment minimises the sum of squared differences (SSD); normalised cross-correlation is more robust to gain and bias changes.
- Phase correlation uses the Fourier transform to find a translation as a single spike in the correlation output.
- Incremental (Lucas-Kanade) refinement linearises the brightness constancy constraint with a Taylor series and repeats, and it underlies motion-compensated video compression.
- Coarse-to-fine estimation on an image pyramid lets small search windows handle large motions.
- Optical flow gives a motion vector per pixel; one equation per pixel is not enough (the aperture problem), so a smoothness term as in Horn and Schunck, or a learned prior, is needed.
- Deep flow networks use iterative coarse-to-fine or residual refinement, and benchmarks such as Middlebury and Sintel are used to compare methods.
- Layered motion models a scene as layers with their own motion and transparency, which supports frame interpolation, reflection separation and video object segmentation.
Practice Tip: Compute dense optical flow between two video frames with OpenCV or a pre-trained deep model, show it as a colour image, then warp the first frame with the flow and check how close it gets to the second.
Common Mistake: Trusting flow in textureless regions or along straight edges. The data only constrains motion perpendicular to the edge there, and brightness changes between frames also break the brightness constancy assumption.
Important Questions:
- What is the aperture problem? Looking through a small window at a straight edge, only the motion component perpendicular to the edge can be measured, so the full motion vector is ambiguous without texture, corners or a smoothness prior.
- Why is coarse-to-fine search used for motion estimation? A large motion becomes a small one at low resolution, so the pyramid gives a rough estimate cheaply, and each finer level only needs to refine it, which avoids a full search at full resolution.
Chapter 10: Computational photography
Difficulty: Medium · Key topics: radiometric calibration, HDR imaging, tone mapping, flash/no-flash, super-resolution, denoising, demosaicing, matting, texture synthesis, inpainting, style transfer
Computational photography creates images that an ordinary camera could not capture. Section 10.1 calibrates the camera: radiometric response, noise level, vignetting and the point spread function. Section 10.2 merges bracketed exposures into high dynamic range images, compresses them with global and local tone mapping, and combines flash and no-flash shots. Section 10.3 covers super-resolution, denoising, demosaicing and blur removal, including deep networks. Section 10.4 treats matting and compositing, from blue-screen to natural image and video matting, and Section 10.5 covers texture synthesis, inpainting, non-photorealistic rendering and neural style transfer.
Key Points:
- The camera response function maps scene radiance to pixel values and must be known before exposures can be combined; it can be recovered from a bracketed set of shots.
- Real scenes span an enormous brightness range, from about 1 in a dark room lit by a monitor up to about 2,000,000 when looking at the Sun, far more than a display can show.
- Tone mapping squeezes HDR into a displayable range: global curves are simple, local operators keep detail, and the bilateral-filter method compresses a smooth base layer while keeping the detail layer.
- Flash/no-flash photography transfers detail from the sharp flash image to the natural-lighting image with a joint bilateral filter.
- Demosaicing interpolates the missing colours of the Bayer pattern, and super-resolution and denoising range from priors and example-based methods to deep networks.
- Matting estimates the foreground colour, background colour and alpha in
C = (1 - alpha) B + alpha F; the problem is under-constrained, so methods use blue screens, trimaps or optimisation. - Texture synthesis by non-parametric sampling and image quilting, inpainting and neural style transfer all create new pixels from example pixels.
Practice Tip: Merge three bracketed exposures into an HDR image with OpenCV’s Debevec merge, then try two or three tone mapping operators and compare how each treats the bright window and dark corners.
Common Mistake: Averaging bracketed JPEGs directly. Their values are non-linear, so the response function has to be recovered or inverted before exposures are merged.
Important Questions:
- Why is radiometric calibration needed before building an HDR image? Pixel values are a non-linear function of scene radiance, so without the response curve the exposures cannot be put on a common linear scale and the merged radiance values would be wrong.
- How does the bilateral filter help tone mapping? It splits log luminance into a smooth base layer (edge-preserving, so no halos around strong edges) and a detail layer; compressing only the base layer reduces contrast while keeping texture.
Chapter 11: Structure from motion and SLAM
Difficulty: Hard · Key topics: camera calibration, pose estimation, triangulation, essential and fundamental matrix, eight-point algorithm, bundle adjustment, incremental and global SfM, SLAM
This chapter builds sparse 3D models from correspondences and locates cameras inside them. Section 11.1 calibrates intrinsics using targets, vanishing points, pure rotation and radial distortion models. Section 11.2 estimates camera pose with linear and iterative methods and triangulates points. Section 11.3 handles two views: the essential and fundamental matrices, the eight-, seven- and five-point algorithms, projective reconstruction and self-calibration. Section 11.4 scales up to many views with factorization, bundle adjustment that exploits sparsity, match move, internet photo collections, and incremental and global pipelines. Section 11.5 covers SLAM and its use in autonomous navigation and phone augmented reality.
Key Points:
- Intrinsic calibration finds the focal length, image centre and distortion from a planar target, from vanishing points or from a purely rotating camera.
- Pose estimation from known 3D points starts with a linear (direct linear transform) solution and is then refined by iterative non-linear least squares.
- Triangulation recovers a 3D point from matched image points when the camera positions are known.
- The essential matrix relates two calibrated views and the fundamental matrix two uncalibrated ones; the normalised eight-point algorithm estimates them, and the five-point algorithm needs the roots of a 10th degree polynomial.
- Bundle adjustment minimises reprojection error over all cameras and points; its Jacobian is very sparse, so storing the points first and using sparse solvers keeps it fast.
- Large-scale pipelines are incremental (add one image at a time, as in Photo Tourism) or global, and COLMAP is a widely used system of this kind.
- SLAM estimates the camera trajectory and a map in real time, and visual-inertial odometry adds inertial sensors; both power drones, robots and phone AR.
Practice Tip: Photograph a checkerboard from 15 to 20 angles with your phone and calibrate it with OpenCV calibrateCamera. Check the reprojection error, then undistort a wide-angle photo and see the curved lines straighten.
Common Mistake: Treating a reconstruction from one moving camera as metric. Without a known distance, the scale is arbitrary, and uncalibrated reconstructions have further projective ambiguities.
Important Questions:
- What is bundle adjustment? A non-linear least-squares optimisation that jointly refines camera poses, intrinsics and 3D points so that the projections match the measured image features as closely as possible.
- What is the difference between the essential and the fundamental matrix? The essential matrix assumes known camera calibration and encodes rotation and translation direction between two views, while the fundamental matrix also absorbs the unknown intrinsics.
Chapter 12: Depth estimation
Difficulty: Hard · Key topics: epipolar geometry, rectification, disparity, plane sweep, matching costs, window aggregation, graph cuts, multi-view stereo, shape from silhouettes, monocular depth
Depth estimation turns two or more images into depth. Section 12.1 explains epipolar geometry, rectification and plane sweeps, and why disparity is inversely proportional to depth. Sections 12.2 to 12.4 cover sparse and dense correspondence, matching costs such as SSD, normalized cross-correlation and census, local window aggregation and sub-pixel estimation. Section 12.5 adds global optimization with dynamic programming, graph cuts and segmentation-based methods, and Section 12.6 covers deep stereo networks. Section 12.7 moves to multi-view stereo: scene flow, volumetric and surface methods and shape from silhouettes. Section 12.8 ends with depth inferred from a single image.
Key Points:
- Disparity is inversely proportional to depth:
d = f B / z, with focal lengthfin pixels and baselineB. - Rectification warps the image pair so epipolar lines become horizontal scanlines, which reduces matching to a 1D search.
- The disparity space image is a cost volume over pixel position and disparity; a plane sweep builds one by warping the images onto a series of planes.
- Matching costs include SSD, normalised cross-correlation and rank or census transforms, which are robust to exposure differences.
- Local methods aggregate costs over a window and pick the winner per pixel; small windows are noisy and large windows blur depth edges, so shiftable and adaptive windows are used.
- Global methods add a smoothness term and optimise with dynamic programming along scanlines or graph cuts; deep stereo networks learn the cost and the regularisation from data.
- Multi-view stereo builds full surfaces through voxel colouring, space carving, point-cloud methods or shape from silhouettes, and monocular networks predict depth from one image.
Practice Tip: Take a rectified stereo pair and write SSD block matching over a disparity range, first with a 5 by 5 window and then a 15 by 15 window. Compare the noise and the blurred depth edges, then try OpenCV’s semi-global matcher.
Common Mistake: Skipping rectification, or rectifying with a poor calibration. Matches then lie off the scanline and the disparity map fills with errors.
Important Questions:
- How are disparity and depth related? For a rectified pair, disparity equals focal length times baseline divided by depth, so near objects shift a lot between the views and far ones barely move; depth accuracy therefore drops with distance.
- Why is rectification useful in stereo? It makes corresponding points lie on the same image row, so the search for each pixel’s match is a one-dimensional scan instead of a search along a tilted epipolar line.
Chapter 13: 3D reconstruction
Difficulty: Hard · Key topics: shape from shading, photometric stereo, shape from focus, range scanning, signed distance functions, meshes, point and implicit surfaces, morphable models, human body models, BRDF estimation
This chapter collects the other ways to recover 3D shape and appearance. Section 13.1 covers shape from shading, photometric stereo, texture and focus. Section 13.2 covers active range scanning with laser stripes, structured light and depth cameras, and merging range data into one surface. Sections 13.3 to 13.5 compare surface meshes, point-based representations and volumetric or implicit surfaces, including learned implicit functions. Section 13.6 reviews model-based reconstruction of buildings, faces and human bodies using parametric models, and Section 13.7 recovers texture maps, albedos and BRDFs to capture complete 3D models.
Key Points:
- Shading gives local surface orientation, and photometric stereo turns lights on one at a time from known directions to recover per-pixel normals and albedo.
- Shape from texture uses the foreshortening of regular patterns, and shape from focus or defocus uses how sharp each region is across images with different focus settings.
- Active methods project laser stripes or patterns and triangulate; the first Kinect used a speckle structured-light pattern and the Kinect V2 uses time of flight.
- Range scans are merged by averaging signed distance functions in a volume and extracting the surface where the function crosses zero; KinectFusion does this in real time.
- Surfaces can be meshes (with simplification such as progressive meshes), point sets with moving least squares, or implicit volumes and level sets; learned implicit functions such as PIFu can rebuild a clothed human from a single image.
- Model-based reconstruction fits parametric models: architectural primitives, 3D morphable face models and body models such as SMPL, plus kinematic skeletons for tracking.
- Appearance capture estimates texture maps, diffuse albedo and reflectance parameters for a scanned model.
Practice Tip: Photograph a matte object under three or more known light directions, solve a per-pixel least-squares problem for the normal and albedo, then integrate the normals into a height map and look for drift.
Common Mistake: Expecting shape from shading to work on any single photo. It needs known lighting and roughly uniform albedo, which real photographs rarely give.
Important Questions:
- What is photometric stereo? Several images of a static object are taken with the same camera but different, known light directions; the brightness changes at each pixel let you solve for the surface normal and albedo, which resolves the ambiguity of a single shaded image.
- How are several range scans merged into one surface? Each scan contributes a signed distance function to a common volume, the functions are combined with weights, and the final surface is extracted at the zero level.
Chapter 14: Image-based rendering
Difficulty: Medium · Key topics: view interpolation, view-dependent texture mapping, layered depth images, multiplane images, light fields, Lumigraph, environment mattes, video textures, free-viewpoint video, neural rendering, NeRF
Image-based rendering uses photographs plus some geometry to produce new views. Section 14.1 begins with view interpolation using depth maps, view-dependent texture maps and the Photo Tourism system. Section 14.2 uses layered depth images, sprites and multiplane images for 3D photography. Section 14.3 presents light fields and Lumigraphs, which describe appearance as rays and allow synthetic refocusing, and Section 14.4 covers environment mattes. Section 14.5 extends the ideas to video: video textures, free-viewpoint video, walkthroughs and hyperlapse. Section 14.6 closes with neural rendering, from learned blending to voxel-grid and implicit-function models such as NeRF.
Key Points:
- View interpolation forward-warps reference images with depth maps to make in-between views, and holes left by occlusion are filled from the other image.
- View-dependent texture mapping blends the source photographs that were taken from directions closest to the desired view.
- Layered depth images, sprites with depth and multiplane images keep several depth layers per pixel so that hidden surfaces can show when the viewpoint moves.
- A light field or Lumigraph stores rays with a 4D parameterisation; any new view is a slice of this function, and refocusing is possible after capture.
- An environment matte records how a transparent or reflective object bends the background, so it can be placed in front of new backgrounds.
- Video textures find similar frames to create endless, non-repeating loops, and free-viewpoint video uses several cameras and depth to let you move through a recorded event.
- Neural rendering learns the scene representation, from blending depth-warped images to voxel grids and implicit functions that map a position and viewing direction to colour and density, as in NeRF.
Memory Tip: The geometry-image continuum: the more accurate geometry you have, the fewer photographs you need (view-dependent texture mapping), and the less geometry you have, the more photographs you need (light fields).
Common Mistake: Thinking image-based rendering needs no 3D information. Most methods still need depth maps or camera poses from Chapters 11 and 12.
Important Questions:
- What is a light field? A function over all light rays in a scene, usually written with four parameters (two for position, two for direction), so that any camera view can be rendered by sampling it without an explicit 3D model.
- What is a video texture? A short clip is analysed for pairs of similar frames, and the player jumps between them, so a candle flame or flag can be played as a continuous sequence that never visibly repeats.
Chapter 15: Conclusion
Difficulty: Easy · Key topics: summary of the book, engineering, scientific, statistical and learning approaches, first principles, future directions
The short final chapter looks back over the whole book. It restates the path from geometry, optics and signal processing through optimization, statistics and machine learning to applications such as retrieval, captioning, stitching, tracking and augmented reality. The author then argues for combining four ways of working: engineering, scientific, statistical and learning-based. He warns that learning should not become an excuse to blame biased or insufficient training data on someone else, gives reasons to keep studying first principles, and sketches likely directions: attention and feedback in networks, specialised sensors, inertial data and the long-term goal of artificial general intelligence.
Key Points:
- The engineering approach defines the problem, tries and tests alternatives, and deploys the best one, which is why the book gives several alternatives for many problems.
- The scientific approach models physics, image formation, optics and sensor noise, and inverts them with stable and efficient algorithms.
- The statistical approach combines priors and measurement models, using tools such as dynamic programming, graph cuts and belief propagation.
- Machine learning finds patterns that are hard to describe by hand, but the author cautions against treating insufficient or biased data as someone else’s problem.
- Reasons to learn first principles: you need not train a network to learn what a simple model describes exactly, first principles help diagnose failures, they can synthesise training data, and curiosity.
- Expected future directions include more complex architectures with attention and feedback, application-specific sensors, and integration with inertial and active sensing.
Common Mistake: Reading the conclusion as a claim that deep learning has replaced geometry and optimisation. The chapter argues the opposite: the best systems combine learned components with models based on first principles.
Important Questions:
- Why study first principles when deep networks are so strong? They explain why a network fails when it does, let you avoid learning what physics already describes, can generate synthetic training data, and are the most reliable guide when no large dataset exists.
- Which approaches does the author want students to combine? Engineering (define, test and deploy), science (model the physics of image formation), statistics (priors and uncertainty) and machine learning (patterns learned from data).
Appendices A, B and C
Appendix · Difficulty: Medium · Key topics: SVD, eigenvalue, QR and Cholesky decompositions, least squares, sparse solvers, conjugate gradient, maximum likelihood, robust statistics, MAP inference, uncertainty, datasets, software
Appendix A reviews matrix decompositions (SVD, eigenvalue, QR and Cholesky), linear and total least squares, non-linear least squares, direct sparse solvers with variable reordering, and iterative methods such as conjugate gradient, preconditioning and multigrid. Appendix B explains inverse problems and estimation theory, maximum likelihood and least squares, robust statistics, priors and Bayesian inference, Markov random fields and uncertainty estimation. Appendix C lists datasets and benchmarks grouped by chapter, software including OpenCV, PyTorch and TensorFlow, and related courses. The References (about 200 pages) and Index follow.
Key Points:
- Any real
mbynmatrix can be written asA = U S V^T(the SVD); eigenvalue decomposition needs a symmetric matrix, and Cholesky factorization needs a symmetric positive definite one. - QR factorization is the stable way to solve poorly conditioned least squares problems, and total least squares handles errors in all coordinates, as in line or plane fitting.
- Non-linear least squares is solved iteratively; for sparse problems such as bundle adjustment, a good variable ordering reduces fill-in and cost.
- Conjugate gradient converges at a rate set by the condition number, so preconditioning helps, and multigrid is another standard iterative technique.
- With Gaussian noise, maximum likelihood is least squares; robust statistics handle outliers, and a prior turns the estimate into a MAP (Bayesian) one.
- Indexing in the appendices is 0-based, as in the rest of the book, which differs from most mathematics texts.
- Appendix C states there are no official slide sets, and lists the Middlebury, KITTI, COCO and ImageNet benchmarks among its datasets.
Practice Tip: In NumPy, fit a line to points that have noise in both coordinates with np.linalg.svd (total least squares) and compare it with np.linalg.lstsq. The two lines differ most when the noise is large.
Common Mistake: Solving poorly conditioned least squares problems with the normal equations. Forming the product squares the condition number, so QR or SVD is the safer choice.
Important Questions:
- Why does bundle adjustment need sparse solvers? Each measurement involves one camera and one point, so the Jacobian and Hessian are mostly zero; exploiting that structure with a good variable ordering keeps memory and time manageable for thousands of images.
- How do maximum likelihood and least squares relate? If the measurement noise is independent and Gaussian, the parameters that maximise the likelihood are exactly those that minimise the sum of squared errors; with outliers a robust loss replaces the square.
How to Study This Book
The free PDF is the author’s final draft of the second edition and runs to about 1,232 pages: roughly 920 pages of chapters (Chapters 1 to 15), a little over 50 pages of appendices, then about 200 pages of references and the index. Do not plan to read it cover to cover. In Section 1.4 the author calls teaching all of the material in one quarter or semester a Herculean task and advises picking topics that match your course and your projects. Stanford, Berkeley and the University of Michigan, he notes, split this material over two courses.
Check your prerequisites before you start. The preface says the book suits a senior-level undergraduate course for computer science and electrical engineering students, and prefers that they have already taken an image processing or computer graphics course. Section 1.6 adds that the book presupposes general familiarity with linear algebra and numerical techniques, reviewed in Appendix A, and with image processing, reviewed in Chapter 3. In practice you will also meet calculus (gradients and Jacobians), probability (Chapters 4 and 5 and Appendix B) and a fair amount of programming, because the exercises ask you to implement algorithms and test them on your own images.
The author’s 13-week sample syllabus (Table 1.1) is a good template. Week 1 covers Chapters 1 and 2, week 2 Chapter 3, weeks 3 and 4 Chapters 4 and 5 (optimization, then deep learning), and weeks 5 to 8 Chapters 6 to 9 (recognition, features, alignment and stitching, motion). Weeks 9 to 13 take one chapter each: computational photography (10), structure from motion (11), depth estimation (12), 3D reconstruction (13) and image-based rendering (14). A 10-week quarter can go lighter or drop topics. The author prefers several small programming assignments early in the course that build on each other, for example feature matching first and then alignment and stitching, plus a final project chosen around the middle of the term.
For a one-semester computer vision course in BSCS or BS AI, a practical path is Chapter 1, selected parts of Chapter 2 (Sections 2.1 and 2.3), Chapter 3 up to Section 3.3 plus pyramids and warping, then Chapters 5 and 6 for deep learning and recognition. Add Section 7.1 on features, Sections 8.1 and 8.2 on alignment and stitching, and a taste of Chapters 9, 11 and 12 (optical flow, two-view geometry and stereo). If you are impatient to code, the author says you can skip ahead to Chapter 3 and return to Chapter 2 later. Chapter 4 is the hardest early chapter, so on a first pass read Sections 4.1 and 4.3 for regularization and MRFs and leave the variational details for later.
For a deep-learning-first course, go from Chapter 5 to Chapter 6, then add Section 9.3.1 (deep optical flow), Section 10.3 (denoising and super-resolution), Sections 12.6 and 12.8 (deep stereo and monocular depth) and Section 14.6 (neural rendering). Chapter 5 gives only a brief tour of classical machine learning and points to Bishop and others for more, so it does not replace a full machine learning course. For a 3D vision or graphics course, follow Chapter 2 (Section 2.1), Chapter 7 (Section 7.1), Chapter 8 (Section 8.1), then Chapters 11, 12, 13 and 14 in order, since each builds on the one before. Appendix A is a short refresher you should keep open beside Chapters 8 and 11, and Appendix B explains the Bayesian language of Chapter 4 at a more abstract level.
The chapters depend on each other loosely, and Figure 1.12 maps the dependencies. Feature detection and matching (Chapter 7) feeds image alignment (Chapter 8) and structure from motion (Chapter 11); Chapter 9 generalises alignment to dense motion; Chapter 12 extends two-view geometry from Chapter 11; and Chapters 13 and 14 use the 3D results. Optimization and deep learning (Chapters 4 and 5) are used throughout, and the applications scattered through each chapter, such as stitching, colorization or panography, are good project ideas.
Do the exercises, because they are where the book is meant to be learned. Chapters 2 to 14 end with about 172 numbered exercises, from short assignments to open research problems, and Chapters 1 and 15 have none. They ask you to write and test code and the PDF contains no solutions. If you have no language preference, the author recommends Python with NumPy and OpenCV, with Jupyter notebooks or Google Colab, and PyTorch for deep learning. His testing advice from the preface is worth following: first try each algorithm on clean synthetic data with known answers, then add noise, and only then use real photographs from many sources. Appendix C lists datasets and software to start from.
Know what is dated. The final draft is from September 2021, so the research it cites stops about then. Convolutional networks, transformers and the Vision Transformer, GANs, VAEs, CLIP, DALL-E and NeRF are covered, but we found no denoising diffusion models or large foundation models in the text, so read recent papers for those. The classical chapters on geometry, features, optimization, structure from motion and stereo are not affected. This page describes the free PDF as we read it, and the printed Springer edition may have different page numbers.
Used In These Programs
This book is used for the Computer Vision course in: BS Artificial Intelligence · BS Computer Science. Browse all Computer Vision books or all Computer Science books.
Who Should Read This
This book is written for senior undergraduates and graduate students in BS Artificial Intelligence, BSCS and electrical engineering who take a computer vision course, and for MS students and engineers who need a broad reference with pointers to the latest research. It suits the later semesters of a degree, after courses in image processing or graphics, linear algebra and basic probability. It is not a first programming book, and it is not a quick deep learning tutorial; the algorithms are described at a high level and you fill in the details through the exercises. If your signals background is weak, Think DSP covers the Fourier ideas behind Chapter 3. For the probability and Bayesian inference in Chapter 4 and Appendix B, read Think Bayes and Mathematics for Computer Science. Calculus Volume 3 helps with the gradients and Jacobians used in the optimization chapters, and Think Python is a gentle start if you will code the exercises in Python.
Applicable Universities
This book is useful for students at Pakistani universities offering BS Artificial Intelligence, BS Computer Science and MS programs with a computer vision course, including Punjab University, Virtual University, COMSATS, FAST, UET, NUST, and other HEC-recognized institutions.
Official Copy of Computer Vision: Algorithms and Applications
Richard Szeliski offers the PDF on his book page for personal use, and the page asks for your name and e-mail address before it gives you the file. He asks readers not to repost the PDF on other websites and to link to the book page instead, so this page sends you to the official page and does not host the file. The copy you receive is the author’s final draft of the second edition (September 30, 2021), not the Springer print layout. Click below to open the official page.
→ Visit Official PageFAQs
Is Computer Vision: Algorithms and Applications free?
Yes, in the sense that Richard Szeliski offers the second edition as a free PDF on his book page, szeliski.org/Book, after a short form that asks for your name and e-mail address. It is not an open-licence book: Springer holds the copyright (2022), and the author says you are welcome to download the PDF for personal use but not to repost it on any other website. For that reason this page links to the official page and does not host the file.
Which edition is this?
This is the second edition (Springer, 2022; hardcover ISBN 978-3-030-34371-2, eBook ISBN 978-3-030-34372-9). The free PDF is the author’s final draft dated September 30, 2021, about 1,232 PDF pages, not the Springer print layout, so page numbers will differ from the hardcover. The first edition appeared in 2010; the second edition adds the deep learning chapter (Chapter 5), moves recognition to Chapter 6 and adds SLAM, transformers and neural rendering.
How many chapters and exercises does it have?
There are 15 chapters and three appendices (linear algebra and numerical techniques, Bayesian modeling and inference, and supplementary material on datasets, software and courses), followed by references and an index. Chapters 2 to 14 end with exercises, about 172 in all, mostly implementation projects. Chapters 1 and 15 have none, and the PDF contains no solutions.
Is it good for complete beginners?
No. It is written for senior undergraduates and graduate students, and the preface prefers that they have already taken an image processing or computer graphics course. Section 1.6 says the book presupposes familiarity with linear algebra and numerical techniques. Beginners should first learn Python and basic image processing, and can then use Chapters 1 to 3 as a gentle way in.
Does it cover deep learning, transformers and NeRF?
Yes. Chapter 5 covers neural networks, CNNs, transformers, the Vision Transformer, VAEs and GANs, Chapter 6 covers detection, segmentation, CLIP and text-to-image generation, and Section 14.6 covers neural rendering including NeRF. We found no denoising diffusion models or large foundation models in the text, so read recent papers for those.
Is it still current in 2026?
The classical core is: image formation, filtering, features, alignment, structure from motion, stereo and optimization have not changed in substance, and the deep learning and recognition chapters give you the vocabulary for current papers. The text stops at about 2021, though, so recent work such as diffusion models and foundation models is missing. Check the official book page for any update.
Related Books
- Think DSP: Digital Signal Processing in Python – Allen B. Downey
- Think Bayes: Bayesian Statistics in Python – Allen B. Downey
- Calculus Volume 3 – Strang & Herman (OpenStax)
- Mathematics for Computer Science – Lehman, Leighton & Meyer (MIT OCW)
This book takes you from how a camera forms an image to deep recognition, stereo, 3D reconstruction and neural rendering, with algorithms you can implement and test yourself. Browse more Computer Science books for the rest of your semester.
Computer Vision: Algorithms and Applications, 2nd Edition by Richard Szeliski, Springer Texts in Computer Science, 2022 (eBook ISBN 978-3-030-34372-9, hardcover ISBN 978-3-030-34371-2, DOI 10.1007/978-3-030-34372-9). Springer copyright © 2022; no open licence. The free PDF on the author’s book page is the final draft dated September 30, 2021, and the author permits download for personal use but not reposting on other websites. Official source: https://szeliski.org/Book/. This page links to the official page and does not host or copy the book.
© Copyright Policy
Freebooks.pk is an educational resource for students in Pakistan. Textbooks and other books belong to their respective boards, authors and publishers, and all rights remain with them. If you are the copyright holder of any material on this page and want it changed or removed, please contact us or file a request under our DMCA policy. We review every request and remove reported content promptly.
