How to perform the Image Enhancement (Laplacian)
10 次查看(过去 30 天)
显示 更早的评论
Image Enhancement (Laplacian)
I try to perform the Matlab programming with formula equation for image processing as below
x = rgb2gray(imread('onion.png'));
lap = [1 1 1; 1 -8 1; 1 1 1];
lapfi = uint8(filter2(lap, x, 'same'));
sharpened = imsubtract(x, lapfi);
figure;
subplot(1,3,1);imshow(x); title('Original image');
subplot(1,3,2);imshow(lapfi); title('Laplacian filtered image');
subplot(1,3,3);imshow(sharpened); title('Sharpened image');
However I am not sure my answer is correct or not
Kindly please provide your opinion and suggestion thus I will be able to improve my computing skills
0 个评论
回答(1 个)
Mehmet Cagri Aksoy
2020-11-8
img4=imread('PATH');
laplacian_mask = -1 * ones(3);
laplacian_mask(2,2) = 8;
img4_laplacian = conv2(img4, laplacian_mask, 'same');
img4_laplacian = img4 + uint8(img4_laplacian);
figure(4),
subplot(1,2,1), imshow(img4);
title(['\fontsize{8}Original Image ']);
subplot(1,2,2), imshow(img4_laplacian);
title(['\fontsize{8}Laplacian enhanced Image ']);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!