Quiz: 12- and 16-bit images in practice
Before this unit: Camera noise, SNR and PSNR (previous unit); Day 1: Images, filters and frequencies.
Short questions to test your understanding. Try each on paper first, then open the answer.
Q1. A colleague says their 12-bit microscope image “came out completely black”. What is the most likely cause, and is any data lost?
The viewer displays the image with the full 16-bit range 0…65 535, so the brightest 12-bit value (4095) is shown at about 16 of 255: dark grey at best. Nothing is lost; set the display range to 0…4095 (or auto-contrast) and the image appears.
Q2. In uint8, what is 100 - 120 with wrap-around, and with saturation? Which of the two do you prefer for a background subtraction, and what is wrong with both?
Wrap-around: -20 + 256 = 236, a dark pixel becomes nearly white. Saturation: 0. Saturation at least looks right, but it clips the negative half of the noise around the background, so the average background after subtraction is too high (biased), and sums or means over a region are wrong. Better: convert to float or a signed wider type first, keep the negative values, and decide afterwards.
Q3. The same 16 bits, 0xFFFF, are read as uint16 and as int16. What are the two values?
65 535 as uint16 and −1 as int16 (two’s complement: -1 is stored as 2^{16} - 1). The bits are identical; only the type decides the meaning.
Q4. You add up 20 frames from a 12-bit camera in a uint16 image to reduce noise. Where does it go wrong?
What is the largest possible sum?
Up to 20 \cdot 4095 = 81\,900 > 65\,535: bright pixels wrap around and become dark (or saturate, depending on the arithmetic). 16 frames is the most that is always safe (16 \cdot 4095 = 65\,520). Sum in a 32-bit or float image instead.
Q5. A window of width W = 400 HU is used on a CT image. How many HU share one display level? Could you see a lesion that differs by 20 HU from the surrounding organ tissue?
400/256 \approx 1.6 HU per level, so 20 HU is about 13 display levels: visible, if the noise allows it. A wider window (say W = 2000, about 8 HU per level) would compress the difference to 2–3 levels, which is hard to see. That is why radiologists use narrow windows for soft tissue.
Q6. Why should a measurement (mean intensity of a cell, say) never be made on an image after contrast stretching, auto-contrast or tone mapping for display?
Those operations change the values: clipping removes everything outside the window, rounding to 8 bits merges raw values, and auto-contrast and tone mapping are different for each image, so two images are no longer comparable. Display transforms are for the eye; measure on the raw numbers (converted to float if needed).