数字图像和视频处理的基础-第5周中值滤波PSNR练习题
来源:互联网 发布:后序遍历非递归算法 编辑:程序博客网 时间:2024/05/25 08:13
In this problem you will perform median filtering to enhance the quality of a noise corrupted image. Recall from the video lecture that median filtering is effective for removing "salt-and-pepper" noise from images. Follow the instructions below to complete this problem. (1) Download the noisy image from here. Load the noisy image into a MATLAB array and convert the type of the array from 8-bit integer 'uint8' to real number 'double'. Refer to MATLAB problems in previous homework if you need help with loading and converting images. Visualize the noisy image using the built-in MATLAB function "imshow". The function "imshow" takes as its argument either [0-255] for an 8-bit integer array (i.e., of type 'uint8'), or [0-1] for a normalized real-valued array (i.e., of type 'double'). To provide "imshow" with the correct argument, you would need either to "cast" your real-valued array into 'uint8', or normalize it by 255. (2) Perform 3x3 median filtering using the built-in MATLAB function "medfilt2". For this problem, the only argument you need to provide "medfilt2" with is the array you have created in step (1). Visualize the filtered image using "imshow". Remember to either cast the result to 'uint8' or normalize it before feeding it to "imshow". (3) Perform a second-pass median filtering on the filtered image that you have obtained from step (2). Visualize the two-pass filtered image. Compare it with the noisy input image and the 1-pass filtered image. (4) Download the noise-free image from here. Compute the PSNR values between (a) the noise-free image and the noisy input image, (b) the noise-free image and the 1-pass filtering output, and (c) the noise-free image and the 2-pass filtering output. Enter the three PSNR values in the box below. Enter the numbers to two decimal points.
clear;clear all;clear clc;I = double(imread('noisy.jpg'));imshow(I,[]);I1 = medfilt2(I);figure,imshow(I1,[]);I2 = medfilt2(I1);figure,imshow(I2,[]);Ifree = double(imread('noisefree.jpg'));[h w]=size(I);B=8; MAX=2^B-1;MES=sum(sum((Ifree-I).^2))/(h*w); %均方差PSNR1=10*log10(MAX*MAX/MES); %峰值信噪比MES=sum(sum((Ifree-I1).^2))/(h*w); %均方差PSNR2=10*log10(MAX*MAX/MES); %峰值信噪比MES=sum(sum((Ifree-I2).^2))/(h*w); %均方差PSNR3=10*log10(MAX*MAX/MES); %峰值信噪比
- 数字图像和视频处理的基础-第5周中值滤波PSNR练习题
- 数字图像和视频处理的基础-第4周运动估计matlab练习题
- 数字图像处理------中值滤波
- 数字图像的中值滤波
- 数字图像处理,中值滤波和均值滤波及其改进算法的C++实现
- 数字图像处理之椒盐噪声和中值滤波
- 数字图像处理,自适应中值滤波的C++实现
- 数字图像处理中值滤波部分代码
- [Coursera 数字图像和视频处理基础]第一周
- matlab数字图像/视频处理基础 第一篇
- 数字图像处理—图像滤波(中值滤波)
- 数字图像处理之均值滤波,高斯滤波,中值滤波,双边滤波
- Win8Metro(C#)数字图像处理--2.10图像中值滤波
- 数字图像处理——图像平滑(中值滤波)
- 基于DSP的图像中值滤波处理
- 图像处理--中值滤波
- 中值滤波处理
- [Coursera 数字图像和视频处理基础 第二周]Signals and Systems
- hdu 1806 Frequent values(二分+线段树)
- 编程学习好去处:35 个快速学习的编程网站
- NSUserDefaults存储(初学者)
- iOS KVC & KVO
- Windows下Qt静态编译全解
- 数字图像和视频处理的基础-第5周中值滤波PSNR练习题
- 冒泡排序
- 连载:面向对象葵花宝典:思想、技巧与实践(29) - 高内聚低耦合
- NSNotificationCenter消息通信机制介绍(KVO)
- java线程操作方法setName,getName,isAlive
- java上下文Context类
- 判断两个div的位置是否相交,可以判断相互包含的特殊情况
- java 注解
- pca 与 whitening