필터 지우기
필터 지우기

how to bright a picture gradually

조회 수: 1 (최근 30일)
Arbel Cohen
Arbel Cohen 2020년 11월 29일
답변: Image Analyst 2020년 11월 29일
I have pictures that because of the shooting angle and the way they were lit came out lighter on one side and slightly darker gradually as you get closer to the other side of the picture.
Is there any way to make a function which will detect the brighten side of the image and clarify based on that side the whole image gradually? So that the brightness level will be more or less the same in all areas of the image?

답변 (2개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 11월 29일
편집: KALYAN ACHARJYA 2020년 11월 29일
Suggestion: Please see the Gamma Scaling or Power low trasnformation, you can adjust the values of Gamma or Constant as per desired results.
More Detail: Deigital Image Processing Book (Gonzalez) Chapter Name: Image Enhancement. There you may see the figure with mutiple plots.

Image Analyst
Image Analyst 2020년 11월 29일
Yes, you need to do background correction to compensate for any brightess change due to
  1. non-uniform illumination
  2. lens shading
  3. optical vignetting
The best way is to just take a "blank shot" - an image of a uniform gray or white sheet. Then smooth the image with conv2() to get rid of noise and normalize that image by dividing by the max value. Then divide your actual image by that to correct for the background "shading". Something like (untested):
kernel = ones(9); % box filter to blur. Use bigger number for more smoothing.
kernel = kernel / sum(kernel(:)); % Normalize so as to not change the mean gray level.
backgroundImage = imfilter(backgroundImagem kernel); % Smooth
backgroundImage = double(backgroundImage) / max(backgroundImage(:)); % Normalize
backgroundCorrectedImage = double(originalImage) ./ backgroundImage; % Correct
Cast back to uint8 if you need to.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by