Professional Documents
Culture Documents
Computer Graphics
Computer Graphics
2011 1
P-01
Spatial Image Enhancement functions on a bitmap - Rotation (Clockwise). Spatial Image Enhancement functions on a bitmap image Enlargement (Double Size). Laplacian Transform on image Low Pass filter on the image
P-02
P-03 P-04
P-05 P-06
Edge detection on an image M-file function(enhacement[varargin]) to provide all basic gray-level transformations,such as, a. Negative b. Log Law transformation c. Power Law transformation d. Contrast stretching e. Thresholding Plot the histrograms of: a) Dark image b) Bright image c) Low contrast image d) High contrast image For each image show the image & its histogram in two different sub regions of the single figure window.
P-07
P-08
SIET
Page 2
P-09
Spatial domain filters & use convolution function conv2 () to filter the image. Using laplacian filters implement high-boost filtering.
P-10
SIET
Page 3
SIET
Page 4
Original Image
SIET
Page 5
Rotated Image
SIET
Page 6
SIET
Page 7
Original Image
SIET
Page 8
SIET
Page 9
SIET
Page 10
Original Image
SIET
Page 11
SIET
Page 12
SIET
Page 13
SIET
Page 14
SIET
Page 15
SIET
Page 16
SIET
Page 17
Original Image
Output Image
SIET
Page 18
SIET
Page 19
Original Image
SIET
Page 20
SIET
Page 21
Original Image
Output Image
SIET
Page 22
[D] - Contrast Streching Code: function [y]=contraststretch1(varargin) aa=varargin{1}; [m n]=size(aa); a=im2double(aa); sum=0 for i=1:1:m for j=1:1:n sum=sum+a(i,j); end end sum pro=m*n; level=sum/pro;(varargin) S = 1./(1+(level./a).^2) mat2gray(S) y=S
SIET
Page 23
Original Image
Output Image
SIET
Page 24
[E]- Thresholding Code: function [y]=threshold(varargin) aa=varargin{1}; [m n]=size(aa); a=im2double(aa); sum=0 for i=1:1:m for j=1:1:n sum=sum+a(i,j); end end sum pro=m*n; level=sum/pro; for i=1:1:m for j=1:1:n if a(i,j)<level a(i,j)=0; else a(i,j)=1; end end end mat2gray(a) y=a
SIET
Page 25
Original Image
Output Image
SIET
Page 26
SIET
Page 27
SIET
Page 28
SIET
Page 29
SIET
Page 30
SIET
Page 31
SIET
Page 32
SIET
Page 33
SIET
Page 34
SIET
Page 35
SIET
Page 36
SIET
Page 37
SIET
Page 38
SIET
Page 39
SIET
Page 40