Intensity (Image negatives, Log and Power-Law) transformations for DIP and implementation in MATLAB

Study with Dr. Dafda
Study with Dr. Dafda
5.9 هزار بار بازدید - 3 سال پیش - Video lecture series in Digital
Video lecture series in Digital Image Processing, Lecture 9:
Intensity-Gray level (Image negatives, Log and Power-Law) transformations (Point processing functions) for DIP and  implementation in MATLAB
#DIP
#DigitalImageProcessing
#DIPusingMATLAB
#StudyWithDrDafda
MATLAB code used in the video is present at the end in the Description
What is Intensity-Gray level transformation function?
What is Image Negative?
What is Log transformation in DIP?
What is Power-Law (Gamma) transformation in DIP?
What is Gamma correction?
What is Point Processing?
Digital Image Processing using MATLAB
Implementation of Intensity(Gray-level) transformations OR Point processing -  Image negative, Log transformation and Power-law/Gamma transformation of digital image processing  in MATLAB.
Digital Image Processing (DIP) using/in MATLAB

Link to download ppts/lecture notes:
https://drive.google.com/drive/folder...

Links of other lectures in the series:

1. What is Digital Image Processing?
What is Digital Image Processing || I...

2. Human Visual System and Elements of Digital Image Processing
Human Visual System and  Elements of ...

3. Fundamental steps in Digital Image Processing
Fundamental steps in Digital Image Pr...

4. Image Sensing and Acquisition
Image Sensing and Acquisition in Digi...

5. Relationship between Pixels in Digital Image Processing: Neighborhood, Adjacency & Distance measures
Relationship between Pixels in Digita...

6. Image Sampling and Quantization
Image Sampling and Quantization in Di...

7. Spatial and Intensity resolution in Digital Image Processing and its Implementation in MATLAB
Spatial and Intensity Resolution in D...

8. Basics of intensity transformations and spatial filtering and implementation in MATLAB
Basics of Intensity transformations a...

% MATLAB program for point transformations
% Image negative, Log transformations, Power-law transformations

close all;
clear all;
clc;
%% Read and display Image
I0=imread('Maulik.png');%Read image information
I=rgb2gray(I0);%Convert Color image to Grayscale image
% I=imread('Cameraman.tif');
montage({I0, I}, 'Size', [1 2]);
title('Color Image                        Grayscale Image');
%% Image negative
figure
%Id=double(I);
%I_neg = 255-Id;
%montage({I, (uint8(I_neg))}, 'Size', [1 2]);
%title('Original Image                        Negative Image');
I_neg = imcomplement(I);
montage({I, I_neg}, 'Size', [1 2]);
title('Original Image                        Negative Image');
%% Log transformation function
figure
Id=im2double(I);
I_log = 0;
[row,col]= size(Id);
C = 3;
for i=1:row
   for j=1:col
       I_log(i,j) = C*log(1+Id(i,j));
   end
end
subplot(1,2,1);
imshow(Id);
title('Original Image');
subplot(1,2,2);
imshow(I_log);
title('Log transformed Image(factor 3)');
%% Log transformation
figure
%I_log = C.*log(1+Id);
Id=im2double(I);
I_log2 = 2 .*log(1+Id);
I_log3 = 3 .*log(1+Id);
I_log4 = 4 .*log(1+Id);
subplot(2,2,1), imshow(Id), title('Original Image');
subplot(2,2,2), imshow(I_log2), title('Log factor 2');
subplot(2,2,3), imshow(I_log3), title('Log factor 3');
subplot(2,2,4), imshow(I_log4), title('Log factor 4');

%% Gamma transformation function
Id=im2double(I);
figure
I_gamma = 0;
[row,col]= size(Id);
C = 0.6;
gamma = 0.3;
for i=1:row
   for j=1:col
       I_gamma(i,j) = C * Id(i,j)^gamma;
   end
end
subplot(1,2,1);
imshow(Id);
title('Original Image');
subplot(1,2,2);
imshow(I_gamma);
title('Gamma transformed Image(factor 3)');

%% Gamma transformation(Gamma greater than 1)
%I_gamma = C * Id.^gamma;
figure
Id=im2double(I);
I_gamma4 = 1 * Id.^3;
I_gamma5= 1 * Id.^4;
I_gamma6 = 1 * Id.^5;
subplot(2,2,1), imshow(Id), title('Original Image');
subplot(2,2,2), imshow(I_gamma4), title('Gamma factor 3');
subplot(2,2,3), imshow(I_gamma5), title('Gamma factor 4');
subplot(2,2,4), imshow(I_gamma6), title('Gamma factor 5');

%% Gamma transformation(Gamma less than 1)
%I_gamma = C * Id.^gamma;
figure
Id=im2double(I);
I_gamma1 = 1 * Id.^0.6;
I_gamma2 = 1 * Id.^0.4;
I_gamma3 = 1 * Id.^0.3;
subplot(2,2,1), imshow(Id), title('Original Image');
subplot(2,2,2), imshow(I_gamma1), title('Gamma factor 0.6');
subplot(2,2,3), imshow(I_gamma2), title('Gamma factor 0.4');
subplot(2,2,4), imshow(I_gamma3), title('Gamma factor 0.3');
3 سال پیش در تاریخ 1400/05/04 منتشر شده است.
5,908 بـار بازدید شده
... بیشتر