matlab图像滤波课程设计
时间: 2023-12-02 09:43:12 浏览: 108
【课程设计】一种图像中值滤波、边缘检测、hough变换检测直线的用户界面开发-含matlab源代码.zip
以下是一个matlab图像滤波的课程设计示例:
1. 首先,读取一张图像并显示:
```matlab
img = imread('example.jpg');
imshow(img);
```
2. 对图像进行高斯滤波:
```matlab
gaussian_img = imgaussfilt(img, 2);
imshow(gaussian_img);
```
3. 对图像进行中值滤波:
```matlab
median_img = medfilt2(img, [3, 3]);
imshow(median_img);
```
4. 对图像进行自适应中值滤波:
```matlab
adaptive_median_img = adpmedian(img, 5);
imshow(adaptive_median_img);
```
5. 对图像进行均值滤波:
```matlab
mean_img = filter2(fspecial('average', [3, 3]), img) / 255;
imshow(mean_img);
```
6. 对图像进行锐化:
```matlab
sharp_img = imsharpen(img);
imshow(sharp_img);
```
阅读全文