필터 지우기
필터 지우기

Interpolate Missing Pixels in an Image

조회 수: 16 (최근 30일)
pankaj singh
pankaj singh 2023년 2월 11일
답변: Image Analyst 2023년 2월 11일
I have an 512×512 pixel image. The image is in frequency domain, that is, each pixel value is now a complex number.
Now in the frequency domain image, some pixels are missing (Nan values) that need to be interpolated. Kindly help how to interpolate those values so as to closely match in the original values.

채택된 답변

Matt J
Matt J 2023년 2월 11일
편집: Matt J 2023년 2월 11일
You can use either fillmissing o regionfill. The fact that the pixel values are complex is not key. You can operate on the real and imaginary components of the image separately to transfer the processing to the real domain. Or, maybe, you could operate on amplitude and phase.

추가 답변 (1개)

Image Analyst
Image Analyst 2023년 2월 11일
You can use something like
realImage = real(fftImage);
mask = isnan(realImage);
mask = imdilate(mask, true(3));
realImage = regionfill(realImage, mask);
And the same for the imaginary component.
But the question is why are some values nan? I don't think there should be any. Did you use fft2()? Can you attach your original image so we can try to determine that?
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by