How can an image be sharpened or illuminated in one direction or angle?

조회 수: 2 (최근 30일)
Hamid Reza Khodadad
Hamid Reza Khodadad 2020년 6월 16일
답변: Rahul 2024년 12월 3일
I have an image that I want to sharpen at a 45 degree angle. can you help me?

답변 (1개)

Rahul
Rahul 2024년 12월 3일
In order to apply directional sharpening to an image at 45 degrees, consider using the following steps:
  • A kernel specific for 45 degree filtering can be defined.
  • 'imfilter' function can be used to apply the kernel on the image to detect edges along the 45 degree angle.
Here is the example with attached image:
img = imread('rice.png');
% Kernel for 45 degree filtering
kernel = [ 0 1 2; -1 0 1; -2 -1 0];
directionalSharpenedImg = imfilter(double(img), kernel);
imshow(uint8(img));
title('Original Image');
imshow(uint8(directionalSharpenedImg));
title('Image enhanced at 45 degree angle');
In order to sharpen the image without any direction constraints, 'imsharpen' function can directly be used.
The following MathWorks documentations can be referred to know more:
Thanks.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by