i am in need of matlab code for image blurring.plz do provide it as soon as possible

답변 (2개)

Walter Roberson
Walter Roberson 2012년 2월 18일

2 개 추천

I = imread('YourImage.jpg');
blurredI = I + max(I(:)) / 10 * rand(size(I);
imwrite(blurredI, 'BlurredImage.jpg');

댓글 수: 2

Sneha Chakurkar
Sneha Chakurkar 2022년 8월 25일
its showing Error. Code is wrong.
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
Image Analyst 2022년 8월 28일

0 개 추천

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);

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

질문:

2012년 2월 18일

답변:

2022년 8월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by