Question: Question is of Digital Imaging Processing , Computer Science -Free Course Hero Question Answer.
Question Description: Question is of Digital Imaging Processing , Computer Science

Course Hero Answer & Explanation:
Step-by-step explanation
Below is the answer:
close all,
clear all,
clc,
Orig = [
12, 4, 8, 6, 4, 5, 12, 3, 4, 8, 2, 3;
4, 7, 1, 6, 1, 5, 1, 4, 7, 1, 2, 4;
15, 0, 7, 1, 2, 1, 1, 2, 0, 7, 4, 2;
1, 7, 0, 7, 1, 1, 12, 3, 7, 0, 2, 3;
1, 0, 1, 0, 14, 15, 1, 2, 0, 1, 5, 2;
1, 12, 7, 1, 1, 6, 1, 4, 12, 7, 7, 4;
1, 0, 3, 1, 10, 6, 3, 6, 0, 3, 1, 6;
0, 0, 5, 6, 1, 6, 2, 1, 0, 5, 6, 1;
1, 7, 0, 7, 1, 1, 12, 3, 7, 0, 5, 3;
1, 0, 1, 0, 14, 15, 1, 2, 0, 1, 4, 2;
0, 0, 5, 6, 1, 6, 2, 1, 0, 5, 1, 1;
]
[row col] = size(Orig);
Pixel=[];
CumHist=[];
PixelInt = 0:1:15;
for r=1:16
Pixel(r)=0;
CumHist(r)=0;
end
for r=1:row
for c=1:col
temp = Orig(r,c);
Pixel(temp+1) = Pixel(temp+1) + 1;
end
end
for r=1:row
t=0;
for c=1:r
t = uint8(t + Pixel(c));
end
CumHist(r) = t;
end
Pixel
CumHist
subplot(2,2,1); plot(PixelInt,Pixel); grid on,
title(‘Original Image Histogram’); xlabel(‘— Pixel Intensity —>’); ylabel(‘— No. of Pixels’);
subplot(2,2,2); plot(PixelInt,CumHist); grid on,
title(‘Original Image Cumulative Histogram’); xlabel(‘— Pixel Intensity —>’); ylabel(‘— No. of Pixels’);
EnhImg = uint8((15*histeq(Orig)))
for r=1:16
Pixel(r)=0;
CumHist(r)=0;
end
for r=1:row
for c=1:col
temp = EnhImg(r,c);
Pixel(temp+1) = Pixel(temp+1) + 1;
end
end
for r=1:row
t=0;
for c=1:r
t = uint8(t + Pixel(c));
end
CumHist(r) = t;
end
Pixel
CumHist
subplot(2,2,3); plot(PixelInt,Pixel); grid on,
title(‘Equalized Image Histogram’); xlabel(‘— Pixel Intensity —>’); ylabel(‘— No. of Pixels’);
subplot(2,2,4); plot(PixelInt,CumHist); grid on,
title(‘Equalized Image Cumulative Histogram’); xlabel(‘— Pixel Intensity —>’); ylabel(‘— No. of Pixels’);
Matlab Output:
Orig =
12 4 8 6 4 5 12 3 4 8 2 3
4 7 1 6 1 5 1 4 7 1 2 4
15 0 7 1 2 1 1 2 0 7 4 2
1 7 0 7 1 1 12 3 7 0 2 3
1 0 1 0 14 15 1 2 0 1 5 2
1 12 7 1 1 6 1 4 12 7 7 4
1 0 3 1 10 6 3 6 0 3 1 6
0 0 5 6 1 6 2 1 0 5 6 1
1 7 0 7 1 1 12 3 7 0 5 3
1 0 1 0 14 15 1 2 0 1 4 2
0 0 5 6 1 6 2 1 0 5 1 1
EnhImg =
15 15 15 15 15 15 15 15 15 15 15 15
15 15 15 15 15 15 15 15 15 15 15 15
15 2 15 15 15 15 15 15 2 15 15 15
15 15 2 15 15 15 15 15 15 2 15 15
15 2 15 2 15 15 15 15 2 15 15 15
15 15 15 15 15 15 15 15 15 15 15 15
15 2 15 15 15 15 15 15 2 15 15 15
2 2 15 15 15 15 15 15 2 15 15 15
15 15 2 15 15 15 15 15 15 2 15 15
15 2 15 2 15 15 15 15 2 15 15 15
2 2 15 15 15 15 15 15 2 15 15 15

Image transcription text
No. of Pixels No. of Pixels Original Image Histogram 30 25 2D 15 ID _\ [\J I I _; I: I I 03 I I 07 I I 41-. I I 5 ID 15 Pixel Intensity —> Equalized Image Histogram …/\ ……… ………………….. …………………. 5 “ID Pixel Intensity —> No. of Pixels No. of Pixels Original Image Cumulative Histogram _L 41-. I I _L [\J I I _’L I: I I ‘0 5 ID 15 Pixel Intensity —> Equalized Image Cumulative Histogram 20 1 5 ………………… ………………….. ………………… D 5 “ID 15 Pixel Intensity —>