image blurring
25 ビュー (過去 30 日間)
古いコメントを表示
i am in need of matlab code for image blurring.plz do provide it as soon as possible
0 件のコメント
回答 (2 件)
Walter Roberson
2012 年 2 月 18 日
I = imread('YourImage.jpg');
blurredI = I + max(I(:)) / 10 * rand(size(I);
imwrite(blurredI, 'BlurredImage.jpg');
2 件のコメント
Walter Roberson
2022 年 8 月 28 日
filename = 'flamingos.jpg';
I = imread(filename);
imshow(I); title('original');
blurredI = cast(double(I) + double(max(I(:))) / 10 * rand(size(I)), 'like', I);
imwrite(blurredI, 'BlurredImage.jpg');
imshow(blurredI)
diffI = imsubtract(blurredI, I);
imshow(rescale(diffI))
Image Analyst
2022 年 8 月 28 日
Try this:
fontSize = 15;
% Blur a gray scale image.
windowSize = 19;
kernel = ones(windowSize) / windowSize ^ 2;
grayImage = imread('cameraman.tif');
subplot(2, 2, 1);
imshow(grayImage);
title('Original Image', 'FontSize',fontSize);
blurryImage = imfilter(grayImage, kernel);
subplot(2, 2, 2);
imshow(blurryImage, []);
title('Blurred Image', 'FontSize',fontSize);
% Blur an RGB image.
windowSize = 19;
kernel = ones(windowSize) / windowSize ^ 2;
rgbImage = imread('peppers.png');
subplot(2, 2, 3);
imshow(rgbImage);
title('Original Image', 'FontSize',fontSize);
blurryImage = imfilter(rgbImage, kernel);
subplot(2, 2, 4);
imshow(blurryImage, []);
title('Blurred Image', 'FontSize',fontSize);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



