matlab code sharpening a image?

2 ビュー (過去 30 日間)
ayesha younis
ayesha younis 2016 年 1 月 1 日
コメント済み: Image Analyst 2016 年 1 月 2 日
please tell me the matlab code for a single image sharpening?

採用された回答

Image Analyst
Image Analyst 2016 年 1 月 1 日
You can use conv2() or imfilter(). For example
kernel = -1 * ones(3)/9
kernel(2,2) = 8;
kernel = kernel / sum(kernel(:)); % Normalize sum to 1.
% High frequency boost filter
sharpenedImage = conv2(double(grayImage), kernel, 'same');
imshow(sharpenedImage);
That's one way. Or you can use a Difference of Gaussians image built with two calls to imgaussfilt(), or two to fspecial and then one to imfilter (which might be faster than two imgaussfilt() calls).
  2 件のコメント
ayesha younis
ayesha younis 2016 年 1 月 1 日
write down the code of the mat-lab for image sharpening along with flow diagram?
Image Analyst
Image Analyst 2016 年 1 月 2 日
I did write down the code. The flow is basically you're computing the average difference between a pixel and it's 8 neighbors - this is the Laplacian, which is the high frequencies. Then you're adding back in the original image so that you now also have the low frequencies. Result is the original image with boosted high frequencies. I'll let you draw the flow chart.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by