资源预览内容
第1页 / 共23页
第2页 / 共23页
第3页 / 共23页
第4页 / 共23页
第5页 / 共23页
第6页 / 共23页
第7页 / 共23页
第8页 / 共23页
第9页 / 共23页
第10页 / 共23页
亲,该文档总共23页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1Digital Image ProcessingProject chapter: Chapter 3 Project number: Proj03-01 Proj03-06 Students name: Students number: Class: 2ContentsIMAGE ENHANCEMENT USING INTENSITY TRANSFORMATIONS .1HISTOGRAM EQUALIZATION .7ARITHMETIC OPERATIONS .10SPATIAL FILTERING.14ENHANCEMENT USING THE LAPLACIAN.17UNSHARP MASKING .203Image Enhancement Using Intensity TransformationsExp. 5,PROJECT 03-01ObjectiveTo manipulate a technique of image enhancement by intensity transformation or gray level transformation.RequirementsThe focus of this project is to experiment with intensity transformations to enhance an image. Download Fig. 3.8(a) and enhance it using:(a) The log transformation of Eq. (3.2-2): s=c log(1+r);(b) A power-law transformation of the form shown in Eq. (3.2-3): s=cr .Figure 1 Fig 3.05(a)4Figure 2 Fig. 3.8(a)Technical discussion 【1】I = mat2gray(A) sets the values of amin and amax to the minimum and maximum values in A.【2】I2 = im2uint8(I1) converts the grayscale image I1 to uint8, rescaling the data if necessary.Program listings【1】log transformationI=imread(Fig3.05(a).jpg);subplot(121);imshow(I);title(original);I1=im2uint8(mat2gray(log(1+double(I);subplot(122);imshow(I1);5title(log transformation);【2】power-law transformationI=imread(Fig3.08(a).jpg);subplot(221);imshow(I);title(original);J=double(I);I1=im2uint8(mat2gray(J.0.6);subplot(222);imshow(I1);title(power-law:gamma=0.6);I2=im2uint8(mat2gray(J.0.4);subplot(223);imshow(I2);title(power-law:gamma=0.4);I3=im2uint8(mat2gray(J.0.3);subplot(224);imshow(I3);title(power-law:gamma=0.3);Discussion of results original log transformationFigure 3 results of log transformation6original power-law:=0.6power-law:=0.4 power-law:=0.3Figure 4 results of power-law transformationAnalysis Log transformation can diminish dynamic range of the image.Power-law transformation can change the contrast of the image.7Histogram EqualizationExp. 6,PROJECT 03-02 Multiple UsesObjectiveTo manipulate a technique of image enhancement by histogram equalization.Requirements(a) Write a computer program for computing the histogram of an image.(b) Implement the histogram equalization technique discussed in Section 3.3.1.(c) Download Fig. 3.8(a) and perform histogram equalization on it.Figure 5 3.8(a)8Technical discussion 【1】J = histeq(I, n)transforms the intensity image I, returning in J an intensity image with n discrete gray levels.【2】imhist(I) displays a histogram for the image I above a grayscale colorbar.Program listingsI=imread(Fig3.08(a).jpg);subplot(221);imshow(I);subplot(222);imhist(I);I1=histeq(I,256);subplot(223)imshow(I1);subplot(224);imhist(I1);9Discussion of results 0500010000150000 100 2000500010000150000 100 200Figure 6 the results of project 03-02Analysis We can see more details in the dark part.10Arithmetic OperationsExp. 7,PROJECT 03-03 Multiple UsesObjectiveTo know how to do arithmetic operations on an image and the functions ofsome arithmetic operations.RequirementsWrite a computer program capable of performing the four arithmetic operations between two images. This project is generic, in the sense that it will be used in other projects to follow. (See comments on pages 112 and 116 regarding scaling). In addition to multiplying two images, your multiplication function must be able to handle multiplication of an image by a constant.Figure 7 Fig3.15(a)Technical discussion 【1】Z = imadd(X,Y)11adds each element in array X with the corresponding element in array Y and returns the sum in the corresponding element of the output array Z.【2】Z = imsubtract(X,Y) subtracts each element in array Y from the corresponding element in array X and returns the difference in the corresponding element of the output array Z.【3】Z = immultiply(X,Y)multiplies each element in array X by the corresponding element in array Y and returns the product in the corresponding element of the output array Z.【4】Z = imdivide(X,Y) divides each element in the array X by the corresponding element in array Y and returns the result in the corresponding element of the output array Z.Program listingsI=imread(Fig3.15(a)1top.jpg);subplot(431);imshow(I);title(image 1);I1=imread(Fig3.15(a)2.jpg);subplot(432);imshow(I1);title(image 2);I2=imadd(I,I1);subplot(433);imshow(I2);title(addition);subplot(434);imshow(I2);title(image 1);subplot(43
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号