Question

In: Electrical Engineering

Consider two Images of same dimensions where one image is an original image and other should...

Consider two Images of same dimensions where one image is an original image and other should be a degraded image.   

Write a matlab program to measure picture quality using objective assessment validation criteria for the degraded image and original image. Calculate MSE, PSNR, Normalized absolute error, Maximum Difference, Structural content, Average difference, Normalized cross correlation for the images.

  

Explain the importance of Objective assessment in Image processing

Solutions

Expert Solution

function img = correctLighting(img, method)
if nargin<2, method='rgb'; end
switch lower(method)
case 'rgb'
%# process R,G,B channels separately
for i=1:size(img,3)
img(:,:,i) = LinearShading( img(:,:,i) );
end
case 'hsv'
%# process intensity component of HSV, then convert back to RGB
HSV = rgb2hsv(img);
HSV(:,:,3) = LinearShading( HSV(:,:,3) );
img = hsv2rgb(HSV);
case 'lab'
%# process luminosity layer of L*a*b*, then convert back to RGB
LAB = applycform(img, makecform('srgb2lab'));
LAB(:,:,1) = LinearShading( LAB(:,:,1) ./ 100 ) * 100;
img = applycform(LAB, makecform('lab2srgb'));
end
end

function I = LinearShading(I)
%# create X-/Y-coordinate values for each pixel
[h,w] = size(I);
[X Y] = meshgrid(1:w,1:h);

%# fit a linear plane over 3D points [X Y Z], Z is the pixel intensities
coeff = [X(:) Y(:) ones(w*h,1)] \ I(:);

%# compute shading plane
shading = coeff(1).*X + coeff(2).*Y + coeff(3);

%# subtract shading from image
I = I - shading;

%# normalize to the entire [0,1] range
I = ( I - min(I(:)) ) ./ range(I(:));
end


img = im2double( imread('http://i.stack.imgur.com/JmHKJ.jpg') );
subplot(411), imshow(img)
subplot(412), imshow( correctLighting(img,'rgb') )
subplot(413), imshow( correctLighting(img,'hsv') )
subplot(414), imshow( correctLighting(img,'lab') )


Related Solutions

Consider two policy regimes: One where the FOMC’s instrument is the money supply, and the other...
Consider two policy regimes: One where the FOMC’s instrument is the money supply, and the other when it is the interest rate. Assume that monetary policymakers do not immeidtaely know the shocks that are affecting the economy. In each regime, consider the effect of (a) an adverse demand shock and (b) an increase in risk aversion (an increase in the demand for money). Use IS-LM and IS-MP curves to show how each shock affects the interest rate and GDP in...
An image is partitioned into two regions, one white and the other black. A reading taken...
An image is partitioned into two regions, one white and the other black. A reading taken from a randomly chosen point in the white section will be normally distributed with μ=4 and σ2=4, whereas one taken from a randomly chosen point in the black region will have a normally distributed reading with parameters (6, 9). A point is randomly chosen on the image and has a reading between 4 and 5. What is the probability that the point is in...
1. What is a copyright image? 2. Why should you not use copyright images when designing?...
1. What is a copyright image? 2. Why should you not use copyright images when designing? 3. Why is it not okay to modify copyright work to make your own? 4. Why do some companies put watermarks on their work? 5. Why legal ramifications can result from using a copyright image? 6. What risks can a designer run into when just doing an image search on a search engine? 7. How can using someone else work, hurt the artist that...
You are considering two columns with identical dimensions. One is constructed out of steel, the other...
You are considering two columns with identical dimensions. One is constructed out of steel, the other aluminium, which will buckle at a smaller load? The euler formula for critical buckling force for column, pin jointed at both ends is given by Pcr = pi^2 EI/ L^2 if the end of the column are constrained to prevent rotation, how will the buckling force change?
Two spheres have the same diameter and mass, but one is solid and the other one...
Two spheres have the same diameter and mass, but one is solid and the other one is hollow. Assuming homogeneous densities and putting the origin at the center, calculate the inertia tensor of each sphere.
Consider a Cassegrain-focus, reflecting telescope. Images recorded at Cassegrain-focus will be: A. Oriented the same as...
Consider a Cassegrain-focus, reflecting telescope. Images recorded at Cassegrain-focus will be: A. Oriented the same as in the sky B. Flipped compared to what is in the sky     C. Rotated clockwise compared to what is in the sky D. Rotated counter-clockwise compared to what is in the sky [For a rating, please explain, in detail, the correct answer)
Two sources emit sound with the same frequency. One source is at rest and the other...
Two sources emit sound with the same frequency. One source is at rest and the other is moving at a rate of 5 m / s toward the stationary observer. Observers hear kites 6 times per second. Determine the frequency of the sound emitted by the source.
Consider two firms that are the same in every aspect, except one is levered and the...
Consider two firms that are the same in every aspect, except one is levered and the other is unlevered. The Federal Reserve announces that it will lower the benchmark interest rate in response to the pandemic. How will this affect the value of the levered firm and the unlevered firm? Explain the effects on each firm separately.
Two objects, one having three times the mass of the other, are dropped from the same...
Two objects, one having three times the mass of the other, are dropped from the same height in a vacuum. At the end of their fall, their speeds are the same because: Select one: a. all objects reach the same terminal velocity b. the force of gravity is the same for both objects c. the acceleration of the largest object is three times greater than that of the smallest object d. no option displayed e. everything that falls into the...
Two stars are the same size. One star has a temperature of 50,000 K, the other...
Two stars are the same size. One star has a temperature of 50,000 K, the other has a temperature of 5,000K. Compared to the cooler star, how many times more luminous should the hotter star be? Which star will appear bluer?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT