Enhancing Image with Histogram Matching and Median Filter

조회 수: 1 (최근 30일)
Qvna Lhyvnav
Qvna Lhyvnav 2020년 1월 24일
댓글: Qvna Lhyvnav 2020년 2월 23일
I want to enhance the MRI image by histogram matching and median filter, but the result is unexpected with this code:
% Grayscaled Image
A = imread ('D:\TESIS\1.jpg');
B = rgb2gray(A);
% High Pass Filtered Image
h = fspecial('log', [3 3], 0.5);
C = imfilter (B,h);
% Enhanced Image
D = imhistmatch(B,C);
E = medfilt2(D);
figure;
subplot(2,2,1), imshow(A); title('Original Image');
subplot(2,2,2), imshow(B); title('Grayscaled Image');
subplot(2,2,3), imshow(C); title('High Pass Filtered Image');
subplot(2,2,4), imshow(D); title('Enhanced Image');
My image is 1.jpg and I'm expecting the result is similar to this Test.png instead of in the code. I am wondering what is missing. Thank you.
  댓글 수: 2
Image Analyst
Image Analyst 2020년 1월 24일
Why don't you plot all three histograms (before, reference, and after) to see what they look like?
If you want an EXACT histogram match, see My File Exchange for code that does that much more exactly than the built-in function.
Qvna Lhyvnav
Qvna Lhyvnav 2020년 2월 23일
Thank you for the answer before. I already added the grayscale image with the built-in function image and I got the expected result.

댓글을 달려면 로그인하십시오.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 1월 24일
편집: KALYAN ACHARJYA 2020년 1월 24일
I want to enhance the MRI image by histogram matching and median filter
Histogram Matching:
Are you considering with target image?
Median filter:
A median filter use for signal smoothing, it may smooth the internal part, but I don't think it can generate the clear border view.
  댓글 수: 1
Qvna Lhyvnav
Qvna Lhyvnav 2020년 2월 23일
Histogram Matching:
Yes.
Median Filter:
Yes, it is but I used it after added the grayscale image with the histogram matching image and I got the expected result.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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