20-Bio-B4 Robotics · December 2016
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format: National Exams, December 2016 — 04-Bio-B4 Image Processing. Three hours, open book (any paper notes or textbooks permitted, but no calculator or computer). Six questions of equal value (20 marks each); five constitute a complete paper and only the first five appearing in the answer book are marked. All six are solved here, because this set is a study resource rather than an examination script. Every question is essay/descriptive (definitions, algorithm/system design) except the convolution-size arithmetic and FFT/3D-convolution items in Question 2, and the illustrative numeric design examples worked into Questions 5 and 6.
Reference texts (the books a candidate should have reviewed for this subject):
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given. A colour RGB video $I_t$ at 10 frames/second, a mostly-static subject, and a pulse-induced colour change too small to see directly (a photoplethysmographic signal).
Find. A system that reports the average pulse rate (beats per minute) over the last 10 seconds of video.
Approach. Reduce each frame to a single number (the spatially-averaged colour intensity over a skin region of interest), track that number over time, and estimate its dominant periodicity in the frequency domain, since a pulse rate is fundamentally a frequency and the frequency domain concentrates a weak periodic signal into one identifiable peak while noise stays spread across the spectrum.
Automatic localization is strongly preferred over manual selection for a usable system: use a standard skin/face detector (colour-based skin segmentation in a perceptual space, e.g. thresholding in YCbCr or HSV, or a dedicated face detector when the subject is a face) to find a candidate region, then restrict the region of interest to a sub-patch expected to be well-perfused and easy to keep still relative to the frame (forehead or cheek for a face; a large flat skin area otherwise). Automatic detection also lets the system re-localize if the subject shifts slightly between frames, which a one-time manual selection cannot do.
The dominant disturbances are: (i) ambient illumination changes (a flickering light, or a slow drift as room lighting changes), which show up as a low-frequency or discrete-frequency component that can swamp or be confused with the much smaller pulse signal — handled by detrending (subtracting a local moving average / the segment mean) before spectral analysis, and by restricting the frequency search to the physiologically plausible pulse band (roughly 40–200 BPM, i.e. 0.67–3.3 Hz) so that illumination flicker at unrelated frequencies (e.g. 50/60 Hz mains-driven flicker, far outside this band at a 10 fps sample rate) cannot be mistaken for a pulse; (ii) subject motion, which the problem statement assumes is not significant, but any residual small motion shifts the ROI's sampled pixels and adds a motion-correlated artifact — a stated assumption to flag explicitly rather than silently ignore; (iii) sensor/quantization noise, reduced simply by averaging over many pixels within the ROI per frame (spatial averaging), which is a far larger noise-reduction win than any single-pixel signal could offer.
Work in the frequency domain. A pulse rate is intrinsically a frequency (beats per minute), and the raw time-domain colour signal is dominated by noise/illumination effects far larger than the sub-visible pulse-induced colour change — the FFT concentrates the periodic pulse component into a small number of frequency bins while noise energy stays spread across the whole spectrum, making the peak far easier to detect reliably than trying to count individual beats directly from the noisy time-domain trace (e.g. by peak-counting), which is much more sensitive to a single noisy sample.
| Design choice | Value / rationale |
|---|---|
| Signal source | Spatial mean of a colour channel over a skin ROI, one scalar/frame |
| Sampling | 10 Hz (given), 100 samples per 10 s analysis window |
| Domain | Frequency (FFT); pulse band restricted to 40–200 BPM (0.67–3.3 Hz) |
| Verified synthetic example | True 72 BPM signal + noise → FFT peak recovers 72 BPM exactly |
This pipeline, 10-second (100-sample) signal built as a constant baseline plus a small 1.2 Hz (72 BPM) cosine ripple plus additive pseudo-random noise. After detrending (subtracting the window mean) and computing the DFT, restricting the peak search to the 40–200 BPM band and picking the maximum-magnitude bin recovers exactly 72 BPM — the true rate lands exactly on bin 12 of 100 at this sample rate/duration, and the recovered estimate matches it to the precision of one FFT bin ($60/10=6$ BPM resolution at this window length).