{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw12_gamma

hw12_gamma - temp_gamma = double(A Calculation Section Undo...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function[corrected_gamma]=hw12_gamma(A,G1,G2) %This function applies gamma correction to the image. % INPUT ARGUMENTS: A - image array % G1 - gamma correction factor currently applied to image % G2 - new gamma correction factor % OUTPUT ARGUMENTS: corrected_gamma - image array with gamma correction % % ---- Input Section ----
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: temp_gamma = double(A); % ---- Calculation Section ---- % Undo the current gamma correction uncorrected_gamma = 255*((temp_gamma/255).^(1/G1)) % Apply the new gamma correction new_gamma = 255*((uncorrected_gamma/255).^G2) % ---- Output Section ----corrected_gamma = uint8(round(new_gamma))...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online