Whole Image Methods Flashcards
What are histograms, and what are their uses?
The histogram of a digital image with grey levels in the range [0, L-1] is a discrete function p(Rk) = Nk
Where:
k = 0,1,…, L-1
Rk is the kth grey level
Nk is the number of pixels in the image with that grey level information
Histograms provide useful global information about the image, ease computation of some image properties, and can be manipulated to improve the image
What is the difference between a histogram and a normalised histogram?
p(Rk) = Nk
Becomes
p(Rk) = Nk/n
where
n - width x height i.e. the total number of pixels in the image
The bins in a normalised histogram sum to 1.0, and each bin gives the probability of the corresponding grey level appearing in the image
The probabilistic interpretation is valuable in contrast enhancement and automatic thresholding
How is a histogram represented for light and for dark images?
Dark images - Quite large spikes on the left hand side of the diagram. Nothing on the right as there is no light
Light images - Quite large spikes on the right hand side of the diagram. Nothing on the left as there is not much darkness
How is a histogram represented for low contrast and high contrast?
Low contrast - huge spikes in the middle of the diagram
High contrast - lots of very small spikes evenly spread across the whole diagram.
What is the aim in histogram equalisation?
Goal is to improve the contrast of an image:
To transform an image in such a way that the transformed image has a nearly uniform distribution of pixel values
This is more general than linear or piecewise contrast stretching - no parameters to specify ‘apply a transformation that makes the output histogram flat’
How do histogram transforms work (histogram equalisation)?
Map an input histogram, r, onto a new histogram, s.
Assume r has been normalised to the interval [0,1] with r = representing black and r = 1 representing white:
s = T(r) where 0<=r<=1
How do you perform histogram equalisation?
Compute the CDF (cumulative distribution function) of the input image
For each pixel in the input image, the corresponding output pixel intensity is calculated by using the CDF as a look-up table
CDF values will be in the range [0,1], scale the equalised image to fit the rang supported by the output image format
The histogram of the output image will be approximately uniform
What are the strengths for using histogram equalisation?
Works very well when the input images:
Don’t have large bright or dark areas
Aren’t too noisy
If this is the case, then the results can be a bit skewed.
What is a way to combat the weaknesses of histogram equalisation?
Using local equalisation - transforming a histogram for only a segment of the image, rather than the whole thing all at once
How does histogram equalisation affect most histograms?
Usually shrinks the peaks, and strengthens the dips so that the overall average is better, and the angle of the curves on a line traced above all the points is smaller.
What are text-based approaches when trying to find images in a database?
Retrieval of images is via text search
This is done by adding relevant words/phrases to each image
However, annotation is subjective, laborious and unnecessary
What does context-based retrieval mean and what does it contain?
Indexes the image database on visual features, such as colour, shape and texture.
Queries are expressed in those terms or via visual examples
Simple approaches compute metric distance between the query image and each image in the database
What are colour histograms and how are they created?
Choose a colour space - RGB, HSV
Divide the axes to create a reasonable number of divisions - trade-off detail for memory/computational cost
Build a histogram
Normalise if images are different sizes or colour resolutions
They represent the number of pixels for each different colour represented in the bins
Why use colour histograms?
Colour correlates well with class identity
Human vision works hard to preserve colour constancy - presumably because colour is useful
Colour histograms summarise target objects quite well
What are some weaknesses for histograms?
Invariant to translation and rotation
Change slowly as viewing direction changes
Change slowly with object size
Change slowly with occlusion