필터 지우기
필터 지우기

Trying to use Wiener filter to remove blurr and noise, get a matrix of NaN, why?

조회 수: 6 (최근 30일)
Kobi
Kobi 2019년 3월 9일
댓글: Image Analyst 2019년 11월 29일
Hi, i'm trying to remove blurr and noise from an image using wiener filter and can't do this, i get the reconstruction as a NaN complex matrix, how can i fix it?
and please don't show me any built in function, i'm trying to do this by definition.
  댓글 수: 2
Joan B
Joan B 2019년 11월 29일
Were you able to figure it out? I'm stuck on pretty much the same thing.

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

답변 (1개)

John D'Errico
John D'Errico 2019년 3월 9일
You want to do this yourself. So you need to learn to fix the problem. You fix it by learning how a NaN is created, AND by learning where the NaN first occurs. Look at that line.
So go back. Execute each line of that code, ONE at a time. It is pretty short, so no problem. Does a NaN occur (or even an inf)? You could even use
dbstop if naninf
But it is better to just look carefully at your code, at what you are computing.
A nan arises in relatively few cases. Usually they arise from operations like this:
0/0
ans =
NaN
>> inf-inf
ans =
NaN
>> inf/inf
ans =
NaN
So any operation where the result is indeterminate, this causes a NaN. So, as soon as a NaN or inf arises, look to see what caused it. Look carefully at the operations in that line. Did you do something silly? Do you have something you might not expect in one or more of your variables in that line?

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by