I have problem with MSE. I'm working on noise-reduction filters and one of type how to figure out which filter is bether is MSE. Here's code:
X = getappdata (0, 'X');
C = uigetfile('*.*');
C = imread(C);
err = immse(X,C);
panel(handles.panel);
fprintf('\n The mean-squared error is %0.4f\n', err);
Where X is imported image in other function. Denoised image is result from X so they have same size, I allready checked that. Any ideas how to figure this out?

답변 (2개)

Image Analyst
Image Analyst 2018년 3월 13일

0 개 추천

Figure WHAT out? Images with a lower MSE will be closer to the reference image. What are you doing with the panel() function?

댓글 수: 6

Tomas Pechac
Tomas Pechac 2018년 3월 13일
problem is that MSE script ins't executed because A and B aren't same size but they are. So i didn't get result
What does this show
>> size(X)
>> size(C)
>> whos X
>> whos C
By the way, it's probably not good practice to use C as a string at one point, then as a numerical array later.
they are same:
>> whos X;
Name Size Bytes Class Attributes
X 399x281 112119 uint8
>> whos C;
Name Size Bytes Class Attributes
C 399x281 112119 uint8
Image Analyst
Image Analyst 2018년 3월 13일
편집: Image Analyst 2018년 3월 13일
Please attach the images you used for X and C so we can reproduce. Also explain what the panel() function is doing because it's not a built-in function.
Tomas Pechac
Tomas Pechac 2018년 3월 13일
panel function is removed it was just an experiment. Image on left is original noised image and on the right is de-noised.
Tomas Pechac
Tomas Pechac 2018년 3월 13일
both are in grayscale and don't have an 3rd dimension.

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

Steve Eddins
Steve Eddins 2018년 3월 13일

0 개 추천

Compare the output of size(X) and size(C) to double-check your assumption that X and C are the same size.

댓글 수: 3

Tomas Pechac
Tomas Pechac 2018년 3월 13일
they are same size, that's what I don't understand
nur Iqtiffah
nur Iqtiffah 2019년 11월 23일
Hi, do you solve your problem yet? Cuz i have the same problem. Can you please respond asap?
Image Analyst
Image Analyst 2019년 11월 23일
I don't understand your problem. Are your images the same size and number of color channels and immse() throws an error? Attach both your images with the paper clip icon.

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

카테고리

도움말 센터File Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

질문:

2018년 3월 13일

댓글:

2019년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by