필터 지우기
필터 지우기

how to do logarithmic image normalization?

조회 수: 107 (최근 30일)
mahesh chathuranga
mahesh chathuranga 2013년 10월 13일
댓글: Adam Nustian 2016년 6월 19일
what is logarithmic image normalization?how to do it?(range is 0-255)

채택된 답변

Image Analyst
Image Analyst 2013년 10월 13일
편집: Image Analyst 2013년 10월 15일
I suppose you just get a new image where the image is the log of the pixel value. It's used to enhance dark areas by expanding their range, while not clipping bright areas. Run the code below for a demo.
workspace; % Make sure the workspace panel is showing.
% Read in and display the original gray scale image.
grayImage = imread('Cameraman.tif');
grayImage = double(grayImage);
subplot(2,1,1);
imshow(grayImage, []);
axis on;
title('Original Image', 'FontSize', 15);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
% Take the log of it. Add 1 to avoid taking log of zero.
logImage = log(grayImage+1);
% Normalize to the range 0-1.
normalizedImage = mat2gray(logImage);
% Display it.
subplot(2,1,2);
imshow(normalizedImage, []);
axis on;
title('Log Image', 'FontSize', 15);
% If you want a uint8 version, then you can multiply by 255
% uint8Image = uint8(255 * normalizedImage);
msgbox('Note how the coat has more details');
  댓글 수: 1
Adam Nustian
Adam Nustian 2016년 6월 19일
ImageAnalyst Are you available to review a paper on Log. Image Processing for an international conference?
Thanks

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

추가 답변 (1개)

Anand
Anand 2013년 10월 14일
It sounds like you want to just take the log of the image and rescale the range from 0 to 255. This is something you might want to do to visualize a frequency domain signal. Here's how you can do that:
% take logarithm of image.
imLog = log(im);
% normalize
minLog = min(imLog(:));
maxLog = max(imLog(:));
imLogNorm = 255 * (imLog - minLog)./(maxLog-minLog);

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by