Logarithmic transformation functions can be used to compress the dynamic range of ai image in order to bring out features that were not originally as clear. & Close all open figures and clear all workspace variables. % Generate a logarithmic transformation function. clear ;clc;close all x = 0:255; c = 255 / log (256); y=c*log(x + 1); figure, plot (y),title('Log Mapping Function'), axis tight, axis square % Use the transformation function to generate the adjusted image. I = imread ('tire.tif'); I log = uint8 (v(T + 1)) :

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter3: Designing A Page Layout: Creating A Website For A Chocolatier
Section3.3: Visual Overview: Layout With Positioning Styles
Problem 4QC
icon
Related questions
Question

Shows the results of applying gamma correction to an input image using two different values of n, how does the shape of the curve change if we were to use a different value for n?

Logarithmic transformation functions can be used to compress the dynamic range of an
image in order to bring out features that were not originally as clear.
* Close all open figures and clear all workspace variables.
% Generate a logarithmic transformation function.
clear ;clc;close all
x = 0:255; c = 255 / log (256) ;
y=c*log (x + 1);
figure, plot (y),title('Log Mapping Function'), axis tight, axis square
% Use the transformation function to generate the adjusted image.
imread ('tire.tif');
= I
I_log = uint8 (y(I + 1)) ;
Figure, subplot (2,2,1), imshow (I), title('Original Image');
subplot (2,2, 2), imshow(I_log), title('Adjusted Image');
subplot (2,2,3),imhist(I),title('histogram of original image');
subplot (2,2,4), imhist(I_log), title ('histogram of log image');
% The inverse of the log function is as follows.
exp (x/c) - 1;
I_invlog
figure, subplot (3,1,1), plot (z), title ('Inverse-log Mapping Function');
subplot (3,1,2), imshow (I_invlog), title('Adjusted Image');
subplot (3,1,3), imhist(I_invlog), title ('histogram of invlog image');
= uint8 (z (I_log + 1)) ;
Transcribed Image Text:Logarithmic transformation functions can be used to compress the dynamic range of an image in order to bring out features that were not originally as clear. * Close all open figures and clear all workspace variables. % Generate a logarithmic transformation function. clear ;clc;close all x = 0:255; c = 255 / log (256) ; y=c*log (x + 1); figure, plot (y),title('Log Mapping Function'), axis tight, axis square % Use the transformation function to generate the adjusted image. imread ('tire.tif'); = I I_log = uint8 (y(I + 1)) ; Figure, subplot (2,2,1), imshow (I), title('Original Image'); subplot (2,2, 2), imshow(I_log), title('Adjusted Image'); subplot (2,2,3),imhist(I),title('histogram of original image'); subplot (2,2,4), imhist(I_log), title ('histogram of log image'); % The inverse of the log function is as follows. exp (x/c) - 1; I_invlog figure, subplot (3,1,1), plot (z), title ('Inverse-log Mapping Function'); subplot (3,1,2), imshow (I_invlog), title('Adjusted Image'); subplot (3,1,3), imhist(I_invlog), title ('histogram of invlog image'); = uint8 (z (I_log + 1)) ;
% Create a negative transformation function and show the result after applied to the
moon image.
imread('moon.tif');
= uint8(255:-1:0);
y
I_neg
y (I + 1);
figure, subplot(1,3,1), plot(y),title('Transformation Function'),
xlim ( [0 255]), ylim([0 255]);
subplot (1,3,2), imshow (I), title ('Original Image');
subplot (1,3,3), imshow (I_neg), title('Negative Image');
I_cmp
imcomplement (I); figure, imshow(I_cmp)
Transcribed Image Text:% Create a negative transformation function and show the result after applied to the moon image. imread('moon.tif'); = uint8(255:-1:0); y I_neg y (I + 1); figure, subplot(1,3,1), plot(y),title('Transformation Function'), xlim ( [0 255]), ylim([0 255]); subplot (1,3,2), imshow (I), title ('Original Image'); subplot (1,3,3), imshow (I_neg), title('Negative Image'); I_cmp imcomplement (I); figure, imshow(I_cmp)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT