필터 지우기
필터 지우기

How to perform the Image Enhancement (Laplacian)

조회 수: 22 (최근 30일)
vokoyo
vokoyo 2018년 4월 14일
댓글: M-Muaaz Orabi 2021년 1월 18일
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

답변 (1개)

Mehmet Cagri Aksoy
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 CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by