Digital-Image-Processing-4

上传人:go****e 文档编号:128523897 上传时间:2020-04-21 格式:DOC 页数:19 大小:763.52KB
返回 下载 相关 举报
Digital-Image-Processing-4_第1页
第1页 / 共19页
Digital-Image-Processing-4_第2页
第2页 / 共19页
Digital-Image-Processing-4_第3页
第3页 / 共19页
Digital-Image-Processing-4_第4页
第4页 / 共19页
Digital-Image-Processing-4_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《Digital-Image-Processing-4》由会员分享,可在线阅读,更多相关《Digital-Image-Processing-4(19页珍藏版)》请在金锄头文库上搜索。

1、Digital Image ProcessingComputer Project Report IVContrast Enhancement, Histogram Equalization, Spatial Filtering, & Edge DetectionStudent ID: 20091613310032Name: Xiaopeng JiDate: April 13, 2012A. Objectivesi. Study the effects of contrast enhancement histogram equalization and histogram stretching.

2、ii. Study the effects of histogram equalization via HISTEQ function.iii. Utilizing the SUBPLOT function to display images.iv. Study the effects of spatial filtering using IMNOISE, FSPECIAL, and MEDFILT2 functions.v. Study image noise and how the median and average filters remove noise.vi. Study diff

3、erent methods of edge detection for use on noisy images specifically motion blur, Gaussian noise and filtered Gaussian noise via averaging.vii. Formulate real-world applications which utilize the above functions and concepts.B. MethodsThis project will utilize the functions of MATLAB Image Processin

4、g Toolbox to perform Contrast Enhancement, Histogram Equalization, Spatial Filtering using averaging and median filters, and an Edge detection algorithm experiment.1. IMRESIZE function utilization for image expansion.2. Contrast stretching using IMADJUST and STRETCHLIM functions.3. Histogram equaliz

5、ation using HISTEQ function.4. Data display utilizing SUBPLOT function.5. Spatial filtering using IMNOISE, FSPECIAL, and MEDFILT2.6. Edge detection on noisy images using Matlab noise and edge detection functions.C. Results1. Load image saltAndPepper.gif and use the IMRESIZE function to interpolate b

6、y a factor of 4 using bi-cubic interpolation.At the command prompt enter : saltandpepper_filename=saltAndPepper.gif;saltandpepper_image=imread(saltandpepper_filename);picture_saltandpepper_scale=imresize(saltandpepper_image,60*4 59*4,bicubic);imwrite(picture_saltandpepper_scale,saltandpepper_bicubic

7、.jpg, jpg);The original image, saltAndPepper.gif, was spatially expanded 4x in each dimension using bi-cubic interpolation. The IMRESIZE function was utilized to perform the operation.Figure 1: Original image.Figure2: saltAndPepper.gif spatially expanded by 4x.2. Contrast Stretching Use the MATLAB f

8、unction IMADJUST to perform the contrast stretch.a) Use imadjust(Image, LOW_IN, HIGH_IN,); in this format. LOW_IN, HIGH_IN must be in the 0,1 range so the vector must be scaled by the maximum gray level that the image is quantized to (i.e. 8-bits a 256 gray levels).At the command prompt enter :salta

9、ndpepper_imadjust=imadjust(picture_saltandpepper_cale,0 (180/255),);imwrite(saltandpepper_imadjust,saltandpepper_imadjust.jpg,jpg);Figure 3: Adjusted figure 2 such that the lowest and highest intensities are 0 and 255 respectively.b) Compute the mean gray level (function: MEAN2) and the standard dev

10、iation (function: STD2) and design a mapping function for LOW_IN and HIGH_IN based on the following equations: LOW_IN=(mean-(standard deviation)/2)/256 HIGH_IN=(mean+(standard deviation)/2)/256At the command prompt enter : saltandpepper_mean=mean2(picture_saltandpepper_scale)saltandpepper_std=std2(p

11、icture_saltandpepper_scale)low_in=(saltandpepper_mean-(saltandpepper_std)/2)/256high_in=(saltandpepper_mean+(saltandpepper_std)/2)/256saltandpepper_mean=imadjust(picture_saltandpepper_scale,low_in high_in,);imwrite(saltandpepper_mean,saltandpepper_mean.jpg,jpg);Figure 2: The histogram of cameraman.t

12、ifsaltandpepper_mean = 60.8439saltandpepper_std = 30.3702low_in = 0.1784high_in = 0.2970Figure 4: IMADJUST performed on Figure 2 with LOW_IN and HIGH_IN equal to above calculationsc) Use the function STRETCHLIM to compute the tolerance for the IMADJUST function. The function STRETCHLIM will compute

13、a vector corresponding to LOW_IN, HIGH_IN. Use the vector calculated by STRETCHLIM to in the IMADJUST function described in a.) and compute the image transformation.At the command prompt enter : low_high = stretchlim(picture_saltandpepper_scale, 0)saltandpepper_stretchlim=imadjust(picture_saltandpep

14、per_scale,low_high, );imwrite(saltandpepper_stretchlim , saltandpepper_stretchlim.jpg, jpg);low_high = (0 0.7059)Figure 5: STRETCHLIM performed with IMADJUST on Figure 23. Histogram Equalization Use the function HISTEQ to compute the histogram equalization of the original image.4. Data Display Use t

15、he SUBPLOT command to display your results.At the command prompt enter: imhist(picture_saltandpepper_scale);saltandpepper_EqualizedImage = histeq(picture_saltandpepper_scale);imwrite(saltandpepper_EqualizedImage,saltandpepper_EqualizedImage.jpg, jpg); colormap(gray);subplot(2,2,1);image(picture_saltandpepper_scale);title(Original Image);subplot(2,2,2);image(saltandpepper_mean);title(Mean and Std Image);subplot(2,2,3);image(saltandpepper_stretchlim);title(StretchLim Image);subplot(2,2,4);image(saltandpe

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 幼儿/小学教育 > 其它小学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号