MATLAB 数字图像处理 模糊增强的源码
发布网友
发布时间:2022-05-13 21:27
我来回答
共3个回答
热心网友
时间:2023-10-29 23:50
In a word, the smoothing and sharpen method is using some masks to change the relationship of different pixels. Different masks have different function to process the image.
If I helped you, please pray for my Daddy.
%Time:2011-9-22
%Author: Hyacinth
%Function: Text the difference of different mask
% to sharpen the edge of the image.
clear;
clear all;
close all;
%Load the image
I=imread('d:\Image\text_sharpen.jpg');
%Turn colour image to grayscal one
J=rgb2gray(I);
%Creat these masks for using
h_high_pass = [-1 -1 -1;-1 8 -1;-1 -1 -1];
h_robert_1 = [0 1;-1 0];
h_robert_2 = [1 0;0 -1];
h_sobel_y = [-1 0 1;-2 0 2;-1 0 1];
h_sobel_x = [-1 -2 -1;0 0 0;1 2 1];
% 9*9 LOG
h_LOG=[0 0 3 2 2 2 3 0 0;
0 2 3 5 5 5 3 2 0;
3 3 5 3 0 3 5 3 3;
2 5 3 -12 -23 -12 3 5 2;
2 5 0 -23 -40 -23 0 5 2;
2 5 3 -12 -23 -12 3 5 2;
3 3 5 3 0 3 5 3 3;
0 2 3 5 5 5 3 2 0;
0 0 3 2 2 2 3 0 0];
%High boost (Now 9A-1 = 26),you can chage the value.
h_boost=(1/9)*[-1 -1 -1;-1 26 -1;-1 -1 -1];
%Use the mask to compute
I1=imfilter(J,h_high_pass);
I2=imfilter(J,h_robert_1);
I3=imfilter(J,h_robert_1);
I4=imfilter(J,h_LOG);
I5=imfilter(J,h_boost);
%Show the images
subplot(321),imshow(J);
title('Original');
subplot(322),imshow(I1);
title('High Pass');
subplot(323),imshow(I2);
title('Robert1');
subplot(324),imshow(I3);
title('Robert2');
subplot(325),imshow(I4);
title('LoG(Gaussion)');
subplot(326),imshow(I5);
title('Bosst');
热心网友
时间:2023-10-29 23:51
http://blogs.mathworks.com/steve/2007/08/13/image-deblurring-introction/
matlab图像去模糊入门很好的范例能帮助了解图像去模糊
热心网友
时间:2023-10-29 23:51
《数字图像处理Matlab版》 冈萨雷斯 (著)
上面每一章节都有具体的Matlab代码实现,非常经典,你网上搜下就好,不过你要是想长期学习,推荐购买一本,我就是买的书,所以没有电子版的发给你,抱歉