DREAM PLAN IDEA IMPLEMENTATION 1
2
3 Introduction to Image Processing Dr. Kourosh Kiani Web: Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University
Lecture 04 4
Algebraic operations used for images are commonly viewed in two groups; mathematical and logical operations. Image adding, subtracting, dividing and multiplying operations constitute mathematical processing and “AND, OR, NOT” etc. operations forms logical operations. SIMPLE ALGEBRAIC OPERATIONS in IMAGES
……… …a4a3 …a2a1 ……… …b4b3 …b2b1 a4 +b4 a3 +b3 a2 +b2 a1 +b1 + = ……… …a4a3 …a2a1 a4 +10 a3 +10 a2 +10 a = 10
Reduce noise (increase SNR) averaging, smoothing =
I = imread(‘rice.tif’); J = imread(‘cameraman.tif’); K = imadd(I, J); imshow(K) Or i=imread('rice.png'); j=imread('cameraman.tif'); k=i+j; imshow(k);
I = imread('kourosh.jpg'); figure(1); imshow(I); I2 = imadd(I, 70); figure(2); imshow(I2); + 70 =
Image Averaging Consider a noisy image g(x,y) formed by the addition of noise (x,y) to an original image f(x,y) g(x,y) = f(x,y) + (x,y)
Image Averaging If noise has zero mean and is uncorrelated then it can be shown that = image formed by averaging K different noisy images
Image Averaging Then = variances of g and Then if K increase, it indicates that the variability (noise) of the pixel at each location (x,y) decreases.
Average multiple images (frames) of the same scene together Useful for removing noise =
X = Y = Z = X = uint8([ ; ]); Y = uint8([ ; ]); Z = imsubtract(X,Y) Image Subtracting
rice = imread('rice.png'); figure (1) imshow(rice); background = imopen(rice, strel('disk', 15)); figure (2) imshow(background); rice2 = imsubtract(rice, background); figure (3) imshow(rice2); - =
- 70 = I = imread('kourosh.jpg'); J = imsubtract(I,70); Figure(1), imshow(I), Figure(2), imshow(J) Image Subtracting
_ = Digital subtraction angiography (DSA) Image Subtracting
Digital subtraction angiography (DSA) Image Subtracting
X = Y = Z = X = uint8([ ; ]); Y = uint8([ 5 5 5; ]); Z = immultiply(X,Y) Image Multiplying
I = imread('moon.tif'); figure(1) imshow(I) J = immultiply(I,0.5); figure(2) imshow(J) * 0.5 =
X = Y = Z = X = uint8([ ; ]) Y = uint8([ 5 5 5; ]) Z = imdivide(X,Y) Image Dividing
I = imread('rice.png'); figure(1), imshow(I); background = imopen(I,strel('disk',15)); figure(2), imshow(background); Ip = imdivide(I,background); figure(3), imshow(Ip, []); ÷ =
Image Dividing ÷ 2 = I = imread('rice.png'); J = imdivide(I,2); figure(1), imshow(I) figure(2), imshow(J)
Questions? Discussion? Suggestions ?
26