Тёмный

Histogram equalization/processing in Digital Image Processing with example and perform in MATLAB|DIP 

Study with Dr. Dafda
Подписаться 1,6 тыс.
Просмотров 5 тыс.
50% 1

Video lecture series on Digital Image Processing, Lecture: 13,
Histogram Equalization in DIP and its implementation in MATLAB
What is Histogram?
What is histogram equalization/processing?
Example of histogram plotting.
Example of histogram equalization of an image.
How can histogram plotting/showing and equalization/processing/modelling can be implemented in MATLAB?
How to perform histogram showing and histogram equalization without imhist( ) and histeq( ) command in MATLAB
What is spatial domain image processing?
Is histogram equalization always good? If not what is the solution?
Digital Image Processing (DIP) using/in MATLAB
Link to download ppts/lecture notes:
drive.google.c...
MATLAB code used in the video is present at the end in the Description
#DIP
#DIPwithMATLAB
#DigitalImageProcessing
#StudywithDrDafda
Links of other lectures in the series:
1. What is Digital Image Processing?
• What is Digital Image ...
2. Human Visual System and Elements of Digital Image Processing
• Human Visual System an...
3. Fundamental steps in Digital Image Processing
• Fundamental steps in D...
4. Image Sensing and Acquisition
• Image Sensing and Acqu...
5. Relationship between Pixels in Digital Image Processing: Neighborhood, Adjacency & Distance measures
• Relationship between P...
6. Image Sampling and Quantization
• Image Sampling and Qua...
7. Spatial and Intensity resolution in Digital Image Processing and its Implementation in MATLAB
• Spatial and Intensity ...
8. Basics of intensity transformations and spatial filtering and implementation in MATLAB
• Basics of Intensity tr...
9. Image negatives, Log and Power-Law transformations for DIP and implementation in MATLAB
• Intensity (Image negat...
10. Piecewise linear transformation function: Contrast Stretching in DIP & implementation in MATLAB
• Piecewise linear trans...
11. Piecewise linear transformation function: Intensity-level slicing in DIP and implementation in MATLAB
• Piecewise linear trans...
12. Piecewise linear transformation function: Bit-plane slicing in DIP and implementation in MATLAB
• Piecewise linear trans...
% Matlab program for Histogram showing and Histogram equilization
close all;
clear all;
clc
warning off;
%I=imread('Maulik.png');
%I=imread('pout.tif');
I=imread('Cameraman.tif');
%I=rgb2gray(I);
figure
subplot(1,2,1);
imshow(I);title('Original image');
subplot(1,2,2)
imhist(I); title('Histogram');
J = histeq(I);
figure
subplot(1,2,1);
imshow(J); title('Histogram equalized image');
subplot(1,2,2);
imhist(J); title('Histogram');
%MATLAB Program for histogram equilization without histeq
close all;
clear all;
clc
warning off;
% Read the image
a=imread('Maulik.png');
%a=imread('pout.tif');
% Convert to grayscale incase it is color
a = rgb2gray(a);
b=size(a);
a=double(a);
% Loop for Getting the Histogram of the Original image
freq_counts = zeros(1,256);
for i=1:b(1)
for j=1:b(2)
for k=0:255
if a(i,j)==k
freq_counts(k+1)=freq_counts(k+1)+1;
end
end
end
end
%Generating PDF out of histogram by diving by total no. of pixels
pdf=(1/(b(1)*b(2)))*freq_counts;
%Generating CDF out of PDF
cdf = zeros(1,256);
cdf(1)=pdf(1);
for i=2:256
cdf(i)=cdf(i-1)+pdf(i);
end
cdf = round(255*cdf);
% histogram equilized image
ep = zeros(b);
for i=1:b(1) %loop tracing the rows of image
for j=1:b(2) %loop tracing thes columns of image
t=(a(i,j)+1); %pixel values in image
ep(i,j)=cdf(t); %Making the ouput image using cdf as the transformation function
end
end
% Loop for Getting the Histogram of the Equalized image
hist2 = zeros(1,256);
for i=1:b(1)
for j=1:b(2)
for k=0:255
if ep(i,j)==k
hist2(k+1)=hist2(k+1)+1;
end
end
end
end
subplot(2,2,1);
imshow(uint8(a));title('Original image');
subplot(2,2,3);
imshow(uint8(ep));title('Histogram equilized image');
subplot(2,2,2);
stem(freq_counts);title('Histogram of original image');
subplot(2,2,4);
stem(hist2);title('Histogram of equilized image');

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@balajivenkataramanan316
@balajivenkataramanan316 7 месяцев назад
Hello sir, why the image quality measures like SNR / PSNR are represented in decibels. Or on a logarithmic scale?
@StudywithDrDafda
@StudywithDrDafda 7 месяцев назад
Image quality measures are represented in decibels or on a logarithmic scale because human perception of image quality is nonlinear and very wide. Logarithmic scale accounts for varying sensitivity across intensity levels and offers a compact representation for wide dynamic ranges. It simplifies comparison between images and systems, facilitates standardization, and enables mathematical modeling. In addition, it helps in compressing pixel intensity values ​​and provides insight into system behavior.
@aeminmasoud3977
@aeminmasoud3977 Год назад
best explanation ever
@jayapandis9452
@jayapandis9452 2 года назад
😍😍😍😍 best explanation
@StudywithDrDafda
@StudywithDrDafda 2 года назад
Thank you.
Далее
Implement Histogram Equalisation without Histeq( )
6:50
How I’d learn ML in 2024 (if I could start over)
7:05
Sampling and Quantization in Digital Image Processing
11:33
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Histogram matching in digital image processing
8:19
Просмотров 235 тыс.
Smoothing Spatial Filters in digital image processing
10:19