How do I create and apply a vignetting correction mask?

조회 수: 7 (최근 30일)
Josh
Josh 2014년 3월 4일
댓글: Josh 2014년 3월 7일
I am trying to correct for vignetting that appears in High Dynamic Range Images. In order to do so, I need to create some sort of vignetting correction mask that can be applied to the image in order to counteract the light falloff at the periphery of the image. I have an image of a uniform luminance surface that shows pixel vignetting, and the idea is to divide the entire image by the max pixel value to create an image where each pixel value is a ratio of the max value. In theory, if I divide the vignetted image by the newly created "ratio image", then the vignetting would be corrected. From reading other posts and answers, I am assuming I would have to convert the image to grayscale so that I am dealing with only one pixel value instead of the RGB values. If there is a way to do it without converting it to grayscale then that would be preferred. I know basic commands in matlab so any help would be greatly appreciated.
  댓글 수: 1
Josh
Josh 2014년 3월 4일
I know that vignetting is also depends on aperture size, and I have all of the .jpeg and .RAW files used to compile the HDRI.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2014년 3월 4일
No you do not have to convert to grayscale, but you do get a grayscale image because you do it one one color channel at a time. Essentially this:
% Divide the actual image by the modeled image.
correctedColorChannel = single(oneColorChannel) ./ single(noiselessBackgroundImage);
which is in the attached file. But first you have to create the model background image, which is created from your "blank shot" by the other attached file.
  댓글 수: 1
Josh
Josh 2014년 3월 7일
Thank you for your quick response. I will try this and let you know how it works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by