Question: Image Processing Applications of Probability Theory In this project, groups of four students will collaborate to experiment with probabilistic meth - ods of generating and

Image Processing Applications of Probability Theory
In this project, groups of four students will collaborate to experiment with probabilistic meth-
ods of generating and analyzing images in the MATLAB clone Octave-online. You will be working
with 512512 gray-scale images that use one real number per picture element ("pixel") to represent
shades of gray: the range of these pixel values is 0,1, where 0 represents black and 1 represents
white. To display an image that is stored in matrix A, simply type: imshow(A).
You are given the following functions in an Octave-online bucket (found here):
H=Entropy(P)
Calculates entropy H, in bits, when given quantizer output level probabilities in vector P.
Note: This function normalizes P so that all of its coefficients sum up to 1.
output_levels = MMSE_levels(data, output_levels)
Performs one iteration of the Lloyd-Max algorithm to move quantizer levels, in array
output_levels, toward their optimal values (optimal = those that minimize the mean
squared error between samples in array "data" and their rounded-to-nearest level quantized
versions).
qdata = Quantize(data,output_levels)
Quantizes each coefficient in data by rounding it to the nearest one of the values specified by
array output_levels. Output matrix qdata matches the dimensions of input matrix data.
qdata = Quantize_count(data,output_levels)
After quantizing each coefficient in matrix data to the nearest value in output_levels,
function Quantize_count returns a count of samples at each output level. Output array
count matches the dimensions of input array output_levels. (This function is used to
estimate the probabilities of quantizer output levels.)
Random_samples (x,p,dummy)
Generates samples of a discrete random variable x whose PMF is specified by equal-length
vectors x and p : the probability that x=x(i) is p(i). These samples are returned in array
data, which is of the same size as input array dummy.
Histogram(A)
Display the histogram of a gray-level image (range 0,1) that is stored in matrix A.
b=Huffman(p)
Array b returns the number of bits per variable-length codeword corresponding to probability
values in array p, as found via Huffman coding. Probability values in p may be scaled by
a positive real constant. For example, four equally-likely outcomes may be represented by
either p=[0.250.250.250.25], or by p=[1111].Part I.
a) Graph the image that was provided (type "load image"; image is returned in matrix A).
b) Graph the histogram of the original image.
c) Quantize the image using amplitude levels {0.0,0.2,0.4,0.6,0.8,1.0}(rounding-to-nearest
method). Graph the quantized image.
d) Graph the histogram of the quantized image.
e) Count the number of quantized image pixels at each quantization level. Use these counts
to estimate the PMF of a random variable, x, whose samples have the same probabilities.
Write an expression for Px(x), specifying every amplitude level and its probability.
f) Based on Px(x), calculate E[x].
g) Calculate the average of all pixels values in the quantized image.
h) Calculate the average of all pixels values in the original image.
i) Based on Px(x), calculate E[x2].
j) Calculate the average of all pixel values-squared in the quantized image.
k) Calculate the average of all pixel values-squared in the original image.
Based on Px(x), generate samples of random variable x in a matrix equal in size to that of
the original image. Graph this random image.
m) Graph the histogram of the random image.
n) Calculate the average of all pixels values in the random image.
o) Calculate the average of all pixels values-squared in the random image.
Summarize the numerical results from parts (f)-(k),(n)-(o) in a table. Please Write full answers to all question
 Image Processing Applications of Probability Theory In this project, groups of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!