DIP and Pattern Recognition Important Questions with Answers: Chapter 3 Image Preliminaries and Processing
Every question from the Chapter 3 question bank (image preliminaries and processing), answered exam-style: definition first, key terms in bold, formulas and small examples where they earn marks. Very short answers are one to two lines, short answers five to eight lines, long answers structured with headings.
A. Very Short Answer Questions
| Question | Answer |
|---|---|
| 1. What is image acquisition? | Image acquisition is the process of capturing a real-world scene with a sensor and converting it into a digital image (a grid of numbers). |
| 2. What is electromagnetic radiation? | Electromagnetic radiation is energy traveling as waves (or photons) - radio, infrared, visible light, ultraviolet, X-rays. Light is the visible band of it. |
| 3. Name one source of illumination used in image acquisition. | Sunlight (others: LED lamps, flash, lasers) - the light that falls on the object before reflection into the camera. |
| 4. What is an optical system? | The arrangement of lenses, aperture, shutter and filters that collects light and forms a focused image on the sensor. |
| 5. What is the function of a lens in a camera? | The lens gathers light from the scene and focuses it into a sharp image on the image sensor. |
| 6. What is an image sensor? | An image sensor is the electronic chip (CCD or CMOS) that converts incoming light into electrical signals. |
| 7. What is a photosite? | A photosite is one light-sensitive cell on the sensor; it collects photons and produces charge for one pixel. |
| 8. What does CCD stand for? | Charge-Coupled Device - a sensor that shifts collected charge cell-to-cell to one output amplifier. |
| 9. What does CMOS stand for? | Complementary Metal-Oxide-Semiconductor - a sensor where each photosite has its own readout electronics. |
| 10. What is an Analog-to-Digital Converter (ADC)? | An ADC converts the sensor's continuous voltage into numbers (digital values) that a computer can store. |
| 11. What is sampling in digital image formation? | Sampling is digitizing the spatial coordinates - measuring the scene only at discrete grid points (pixels). |
| 12. What is quantization? | Quantization is digitizing the intensity values - rounding each sampled brightness to one of L discrete levels (for example 0-255). |
| 13. Define feature extraction. | Feature extraction computes a small set of useful measurements (features) from raw image data - for example mean brightness or edge count. |
| 14. What is feature selection? | Feature selection chooses the best subset of the extracted features, dropping irrelevant or redundant ones. |
| 15. What is entropy as an image feature? | Entropy H = - sum p(i) log2 p(i) measures the randomness/information in the intensity distribution; busy textures have high entropy, flat regions near zero. |
| 16. What is a Color Filter Array (CFA)? | A CFA is a mosaic of tiny color filters over the sensor so each photosite records one color (R, G or B). |
| 17. What is a Bayer filter pattern? | The Bayer pattern is the standard CFA: 2 x 2 blocks of two green, one red, one blue filters (green doubled because the eye is most sensitive to it). |
| 18. What is a grayscale image? | A grayscale image stores a single intensity value per pixel (black to white), with no color information. |
| 19. What is spatial resolution? | Spatial resolution is the number of pixels per unit distance - how finely the scene is sampled; low values make images blocky. |
| 20. What is intensity resolution? | Intensity resolution is the number of intensity levels (2^k for k bits); low values cause false contouring. |
| 21. Define a feature vector. | A feature vector is the extracted features of one pattern written as an ordered vector x = [x1, ..., xd] - one point in feature space. |
| 22. What does image variance measure? | Variance sigma^2 = average of (intensity - mean)^2 measures contrast - how widely pixel values spread around the mean. |
| 23. What is a filter method of feature selection? | A filter method ranks features by a statistical score (correlation, chi-square) without training any classifier - fast and classifier-independent. |
| 24. What is a wrapper method of feature selection? | A wrapper method evaluates feature subsets by actually training and testing a classifier on them - slower but tuned to that classifier. |
| 25. What is the purpose of a histogram in image processing? | A histogram counts how many pixels hold each intensity value - it summarizes brightness/contrast and drives operations like histogram equalization and thresholding. |
B. Short Answer Questions
1. Explain the image acquisition process from a real-world object to a digital image.
2. Explain reflection, absorption, and transmission of light during image acquisition.
- When illumination strikes an object, three things share the incoming light energy.
- Reflection: part bounces off the surface - this is the part a camera normally records.
- Absorption: part is taken in by the material and converted to heat - absorption differences create color (a red object absorbs non-red light).
- Transmission: part passes through (glass, water, X-rays through the body) - the basis of transmission imaging.
- Intuition: the pixel value encodes how much light came back from that scene point, which depends on all three.
3. Describe the functions of a lens, aperture, shutter, and filters in a camera.
- Lens: collects scene light and focuses a sharp image on the sensor; focal length sets the field of view.
- Aperture: an adjustable opening controlling how much light enters and the depth of field (sharp range).
- Shutter: controls how long light reaches the sensor; short times freeze motion, long times brighten but blur movement.
- Filters: glass or coatings that pass some light and block the rest - for example UV or infrared blocking, or the color filters of the CFA.
- Together: aperture + shutter set the exposure, the lens sets sharpness and framing, filters set which light participates.
4. Explain how an image sensor converts incoming light into electrical signals.
- Photons from the focused image strike a grid of photosites.
- Each photosite is a semiconductor: absorbed photons free electrons (photoelectric effect).
- The freed charge accumulates during the exposure - more light, more charge.
- The charge of each photosite is read out and converted to a voltage.
- An amplifier boosts the voltage, and the ADC converts it to a digital number.
- Result: each photosite yields one pixel value proportional to the light it received.
5. Differentiate between CCD and CMOS image sensors.
| Readout | CCD: charge shifted cell-to-cell to one amplifier | CMOS: each photosite has its own amplifier |
| Quality | Traditionally cleaner, less noise | Slightly more noise historically (now comparable) |
| Power | Higher consumption | Low power - phone-friendly |
| Speed/cost | Slower readout, costlier to make | Fast, cheap, integrates processing on-chip |
| Used in | Scientific and high-end cameras | Phones, webcams, most modern cameras |
6. Explain how a Color Filter Array (CFA), such as the Bayer pattern, helps capture color images.
- A photosite measures only light amount, not color; color requires separating wavelengths.
- A CFA places a tiny red, green or blue filter over each photosite, so every site records one color.
- The Bayer pattern repeats 2 x 2 blocks: one red, one blue, two greens - because human vision resolves green (luminance) best.
- After capture, each pixel has one true color; the two missing colors are estimated from neighbors (demosaicing).
- Result: a full RGB image from a single sensor - cheap and compact, at the cost of some color detail.
7. Differentiate between sampling and quantization.
| What is digitized | Sampling: spatial coordinates (x, y) | Quantization: intensity values |
| Controls | How many pixels (spatial resolution) | How many gray levels (intensity resolution) |
| Too coarse | Blocky, pixelated image | False contours (visible bands) |
| Typical value | Millions of pixels | 256 levels (8 bits) |
Intuition: sampling decides where we look; quantization decides how precisely we record what we see.
8. Differentiate between spatial resolution and intensity resolution.
- Spatial resolution: pixels per unit distance - the fineness of the sampling grid. Example: 300 dpi vs 72 dpi scans of the same page.
- Intensity resolution: number of distinguishable brightness levels, L = 2^k for k bits per pixel. Example: 8-bit (256 levels) vs 2-bit (4 levels) versions of one photo.
- Low spatial resolution: edges become blocky and fine detail merges.
- Low intensity resolution: smooth shades break into false contours.
- Both together decide how faithfully the digital image matches the scene; storage grows with both.
9. Explain feature extraction and why it is useful in image processing.
- Definition: feature extraction computes a compact set of measurements from raw pixels - mean, variance, entropy, edge counts, texture scores.
- A 1-megapixel image has a million raw values; a feature vector may have only 5-50 numbers.
- Why useful: smaller data is faster and needs fewer training samples (fights the curse of dimensionality).
- Good features highlight class differences (for example texture separates grass from road) while ignoring irrelevant variation (lighting shifts).
- Example: instead of classifying a leaf photo pixel-by-pixel, extract average color, area and edge roughness, then classify those three numbers.
10. Explain filter methods and wrapper methods of feature selection.
- Filter methods: score each feature by a statistic - correlation with the class, chi-square, entropy - and keep the top ones. No classifier is trained.
- Fast and reusable, but they judge features individually, missing useful combinations.
- Wrapper methods: try candidate subsets by training and testing the actual classifier on each (for example forward selection: add the feature that improves validation accuracy most).
- More accurate for that classifier, but expensive - many trainings - and the chosen subset may not transfer to a different classifier.
- Rule of thumb: filter first to shrink hundreds of features, then wrap over the survivors.
11. Explain why an Analog-to-Digital Converter is required in a digital camera.
- The sensor's output is a continuous voltage per photosite - infinitely many possible values.
- A computer can only store discrete numbers.
- The ADC bridges this gap: it measures each voltage and rounds it to the nearest of 2^k digital levels (for example 12 bits = 4096 levels).
- Without an ADC the image could not be stored, processed or transmitted digitally.
- Intuition: the ADC is the translator between the analog world of light and the digital world of the computer; its bit depth sets the intensity resolution.
12. Describe how an 8-bit grayscale image represents pixel intensity.
- Each pixel stores 8 bits, so 2^8 = 256 levels, numbered 0 to 255.
- 0 = pure black, 255 = pure white; the numbers between are gray shades - 128 is mid-gray.
- The image is a matrix of such numbers, for example [[0, 90], [180, 255]].
- One pixel needs exactly one byte, so a 1000 x 1000 image needs about 1 MB uncompressed.
- 256 levels exceed what the eye can distinguish, so 8 bits is the practical standard for grayscale.
13. Explain the role of mean and variance as statistical image features.
- Mean mu = (1/N) sum of pixel values - the average brightness of the image or region.
- Variance sigma^2 = (1/N) sum (value - mean)^2 - the contrast: how much values spread around the mean.
- Role: two tiny numbers summarize a whole region, so they work as features for classification.
- Example: a dark smooth region (low mean, low variance) vs a bright rough texture (high mean, high variance) separate immediately.
- They are fast to compute and lighting-invariant versions exist (normalize first), making them standard first features.
14. What is entropy in an image? Explain how it can be used as a feature.
- Definition: entropy H = - sum over intensity levels of p(i) log2 p(i), where p(i) is each level's share of pixels (from the histogram).
- It measures randomness / information content in bits.
- A flat region (one level, p = 1) has H = 0; a uniform spread over 256 levels has H = 8 bits - the maximum.
- As a feature: busy textures (grass, fabric) have high entropy; smooth regions (sky, walls) have low entropy.
- Example use: region classification - compute entropy per block to separate textured from smooth areas without any training.
15. Explain how correlation can help remove redundant features.
- Correlation measures how strongly two features vary together (+1 perfectly together, -1 perfectly opposite, 0 unrelated).
- Two highly correlated features carry nearly the same information - one is redundant.
- Method: compute the correlation matrix of all features; for any pair with |correlation| above a threshold (for example 0.9), drop one.
- Example: if "area" and "perimeter^2 / 4 pi" correlate at 0.98 across samples, keep only one.
- Benefit: fewer features means faster training, less overfitting, and no information lost - redundancy, not relevance, is removed.
16. Describe the purpose of the chi-square test in feature selection.
- The chi-square test checks whether two categorical variables are independent: chi^2 = sum (O - E)^2 / E over observed vs expected counts.
- Applied to features: bin the feature values and build a table of (feature bin x class) counts.
- A high chi^2 means the feature's distribution depends on the class - the feature is informative and worth keeping.
- A low chi^2 (independence) means the feature carries no class information - safe to drop.
- Purpose summary: it is a fast filter that ranks features by class-dependence before any classifier is trained.
17. Explain why feature selection is important when an image has a large number of features.
- Extracting many features (colors, textures, shapes) can give hundreds of dimensions per image.
- Curse of dimensionality: with fixed training data, more dimensions make estimates unreliable - error first falls, then rises.
- Irrelevant features add noise; redundant ones add cost without information.
- Feature selection keeps the few that separate classes, giving better accuracy, faster training, and simpler, explainable models.
- Example: from 200 texture features, selecting the best 15 can raise test accuracy while cutting computation by 90%.
18. Explain how the number of photosites in a sensor relates to image resolution.
- Each photosite produces one pixel, so the photosite grid size = the image's pixel grid (for example 4000 x 3000 photosites = 12 megapixels).
- More photosites over the same area = finer sampling = higher spatial resolution.
- Below the scene's detail frequency, detail is lost (aliasing/moire); more photosites push that limit higher.
- Caveat: shrinking photosites to fit more of them collects less light each, raising noise - so resolution is not "free".
- Summary: photosite count sets the maximum spatial resolution; photosite size sets the light sensitivity.
19. Describe how a camera reconstructs a color image from red, green, and blue sensor measurements.
- The Bayer CFA gives each photosite one measured color: R, G or B.
- For each pixel, the two missing colors are estimated from neighboring photosites - this is demosaicing.
- Simplest estimate: average the nearest neighbors of the missing color; better methods follow edge directions to avoid color fringes.
- Green gets the most samples (2 of every 4), so it anchors the detail; R and B borrow structure from it.
- The output is a full RGB triple per pixel - the color image ready for storage and display.
20. Explain the advantages and limitation of filter methods for feature selection.
- Advantages: very fast (one statistical pass, no classifier training); classifier-independent, so results generalize; scale to thousands of features; simple to explain (a ranked list).
- Limitations: features are scored mostly one at a time, so a feature useless alone but powerful in combination (for example XOR-type pairs) gets dropped.
- They also ignore how the chosen classifier will actually use the features, so the top-k set is not guaranteed best for that model.
- Typical practice: use filters for a first cut, then a wrapper or embedded method for the final few.
C. Long Answer Questions
1. Explain the complete image acquisition process, from illumination of an object to the formation of a digital image.
Definition: image acquisition is the full chain that converts light reflected from a real scene into a digital image (a matrix of numbers).
Exam line: the pixel value at (x, y) is therefore a measurement of how much light that scene point sent back into the camera.
2. Describe the main components of a camera's optical system and explain the role of the image sensor and ADC in image acquisition.
Optical system components:
- Lens: collects and focuses scene light into a sharp image on the sensor; focal length sets the view.
- Aperture: adjustable opening - controls light amount and depth of field.
- Shutter: controls exposure time; fast freezes motion, slow gathers more light.
- Filters: select which wavelengths pass (UV/IR cut, color filter array).
Image sensor (CCD/CMOS):
- A grid of photosites; each absorbs photons and accumulates proportional charge during the exposure (photoelectric effect).
- Readout converts each site's charge to a voltage; CCD shifts charges to one amplifier, CMOS amplifies per site.
ADC:
- Converts each continuous voltage into a discrete number (k-bit, for example 12 bits = 4096 levels).
- Its bit depth fixes the intensity resolution of the final image.
Together: optics form the image, the sensor turns light into charge, and the ADC turns charge into numbers - the three stages of every digital camera.
3. Explain digital image formation. Include sampling, quantization, grayscale images, spatial resolution, and intensity resolution.
Definition: a scene is continuous in both position and brightness; a digital image must be discrete in both. Formation = sampling + quantization.
Sampling - digitizing the coordinates:
- Record the scene only at grid points; each grid cell becomes one pixel.
- The grid density is the spatial resolution (pixels per unit distance). Too coarse: blocky, aliased images.
Quantization - digitizing the values:
- Round each sampled brightness to one of L = 2^k levels.
- The level count is the intensity resolution; 8 bits gives 256 levels. Too few: false contouring.
Grayscale image: the result when each pixel stores one intensity - a matrix like [[0, 128], [200, 255]] (0 black, 255 white for 8-bit).
Example: the same photo at 64 x 64 pixels / 256 levels looks blocky but smooth-shaded; at 1024 x 1024 / 4 levels it looks sharp but banded - the two resolutions control different artifacts.
4. Define feature extraction and explain its importance. Describe mean, variance, standard deviation, and entropy as image features.
Feature extraction: computing a compact set of measurements from raw pixels. Importance: a million pixels become a few numbers - faster processing, fewer training samples needed, and class-separating information is highlighted.
The four statistical features:
- Mean mu = (1/N) sum of pixel values - average brightness. Dark vs bright regions separate on it.
- Variance sigma^2 = (1/N) sum (value - mu)^2 - contrast: spread of values around the mean.
- Standard deviation sigma = sqrt(variance) - same information in intensity units, easier to interpret (a sigma of 30 means typical pixels sit about 30 levels from the mean).
- Entropy H = - sum p(i) log2 p(i) over the histogram - randomness/information. Flat region: H near 0; rich texture: H near 8 bits for 256 levels.
Example: a clear sky block: high mean, near-zero variance and entropy. A grass block: mid mean, high variance and entropy - the four numbers already separate the two without seeing a single pixel.
5. What is feature selection? Explain why it is required and describe filter methods, correlation, the chi-square test, and wrapper methods.
Definition: feature selection chooses the best subset of the extracted features and drops the rest.
Why required: too many features cause the curse of dimensionality (error rises after a point), waste computation, and hide the informative signal in noise.
Filter methods: score features by statistics without training a classifier; keep the top ranks. Fast and reusable.
Correlation (a filter): measures how strongly a feature tracks the class (or another feature). Drop features with near-zero class-correlation (irrelevant) and one of each pair with near +/-1 mutual correlation (redundant).
Chi-square test (a filter): builds (feature bin x class) counts and computes chi^2 = sum (O - E)^2 / E; a large value means the feature depends on the class - keep it; small means independent - drop it.
Wrapper methods: evaluate subsets by training and validating the real classifier on each (forward selection, backward elimination). Slower, but the subset is tuned to the actual model.
Practice: filter hundreds down to tens cheaply, then wrap over the survivors.
6. Compare CCD and CMOS image sensors in terms of working principle, readout, power consumption, integration, and common use.
| Aspect | CCD | CMOS |
|---|---|---|
| Working principle | Photosites collect charge; the charge itself is transported for readout | Photosites collect charge; each site converts it to voltage locally |
| Readout | Charge shifted cell-to-cell ("bucket brigade") to one output amplifier | Each photosite has its own amplifier; read like memory, in parallel |
| Noise / quality | Uniform amplification - historically cleaner images | Per-pixel amplifiers vary - historically noisier, now comparable |
| Power | High | Low - suits battery devices |
| Integration | Special process; little on-chip logic | Standard chip process - timing, ADC and processing on the same chip |
| Speed and cost | Slower readout, costlier | Fast and cheap |
| Common use | Scientific, astronomy, high-end imaging | Phones, webcams, DSLRs, almost all modern cameras |
Summary: CCD moves charge to a single high-quality reader; CMOS puts a reader in every pixel - trading a little uniformity for speed, power and cost, which is why CMOS dominates today.
7. Explain the difference between spatial resolution and intensity resolution with suitable examples. How does each affect image quality?
Spatial resolution: the density of the sampling grid - pixels per unit distance. It answers "how finely did we look?"
Intensity resolution: the number of brightness levels, L = 2^k for k bits. It answers "how precisely did we record?"
Examples:
- Fax at 100 dpi vs photo scan at 600 dpi: same page, different spatial resolution.
- Same photo saved with 8 bits (256 levels) vs 1 bit (2 levels): same grid, different intensity resolution.
Effect on quality:
- Low spatial resolution: edges become blocky, fine textures merge, small text unreadable.
- Low intensity resolution: smooth gradients break into visible bands (false contouring); skies look posterized.
Exam line: spatial resolution limits the smallest visible detail; intensity resolution limits the smallest visible brightness change. Storage cost grows with both, so acquisition balances them against need.
8. Explain the working of a Color Filter Array using the Bayer pattern and describe how red, green, and blue measurements form a color image.
Problem: a photosite measures light amount, not color. Solution: give each site a colored filter so it sees one band.
CFA working: a Color Filter Array is a mosaic of microscopic R, G, B filters bonded over the sensor; every photosite records exactly one color.
Bayer pattern - the standard mosaic, repeated in 2 x 2 blocks:
| G | R |
| B | G |
Green appears twice because human vision gets most detail from green (luminance); R and B get one site each.
Forming the color image (demosaicing):
- Each pixel starts with one true color measurement.
- The two missing colors per pixel are interpolated from neighbors - for example the green at an R-site is the average of the four adjacent green sites.
- Edge-aware interpolators follow image structure to avoid color fringes.
- Output: a complete RGB triple per pixel - the full color image.
Exam line: one sensor + one mosaic = color imaging at low cost; the price is that 2/3 of each pixel's color is estimated, slightly reducing color detail.
9. Using a suitable example, explain how statistical features such as mean, variance, and entropy can be extracted from an image.
Example image (4 pixels, 4 levels 0-3): values [0, 1, 1, 2].
Step 1 - mean: mu = (0 + 1 + 1 + 2)/4 = 1.
Step 2 - variance: deviations -1, 0, 0, +1; squares 1, 0, 0, 1; sigma^2 = 2/4 = 0.5 (sigma ≈ 0.71).
Step 3 - histogram probabilities: level 0: 1/4, level 1: 2/4, level 2: 1/4, level 3: 0.
Step 4 - entropy: H = -[0.25 log2 0.25 + 0.5 log2 0.5 + 0.25 log2 0.25] = -[0.25(-2) + 0.5(-1) + 0.25(-2)] = 1.5 bits.
Interpretation: the same three numbers computed per region of a real image become its feature vector [mean, variance, entropy] = [1, 0.5, 1.5] - ready for a classifier. A uniform region would score [k, 0, 0]; pure noise would approach [mid, high, log2 L].
Exam line: mean says how bright, variance says how contrasty, entropy says how busy - three cheap numbers that summarize any region.
10. Compare filter and wrapper approaches to feature selection. Discuss their working, advantages, limitations, and a suitable example of each.
Working:
- Filter: rank features by a statistical score (correlation, chi-square, information gain); keep the top k. The classifier never runs during selection.
- Wrapper: search subsets by training and validating the actual classifier on each - for example forward selection: start empty, repeatedly add the feature that most improves validation accuracy.
Comparison:
| Speed | Filter: one pass, very fast | Wrapper: many trainings, slow |
| Classifier dependence | Independent - one ranking serves all models | Tuned to the specific classifier |
| Feature interactions | Misses combinations (scores features alone) | Captures them (scores whole subsets) |
| Overfitting risk | Low | Higher on small data |
Examples:
- Filter: from 100 texture features, drop the 40 whose class-correlation is below 0.1 - done in seconds.
- Wrapper: forward selection over the remaining 60 finds that {entropy, mean, edge count} gives the best validation accuracy for the Gaussian Bayes classifier.
Verdict: filters for scale and a first cut; wrappers for the final, model-tuned few.
Comments
Post a Comment