필터 지우기
필터 지우기

How to interpolate missing z-values: looking for ideas

조회 수: 4 (최근 30일)
Jay Ghosh
Jay Ghosh 2022년 8월 10일
편집: Akira Agata 2022년 8월 15일
Hello Everyone,
I have an image that represents a magnetic (field) anomaly map (attached below). I had (x,y,z) data (.xyz file). Here, x-axis represents longitude values, y-axis represents latitude values, and z values are simply the anomaly values. I loaded the data on matlab and then saved it as a binary image (using imwrite). White pixels (255) represent anomaly values, and black pixels (0) represent background.
The anomaly values (in white) show dominantly linear patterns (marked with red lines), and are oriented nearly north-south. However, as the image shows, the linear patterns show discontinuities due to missing data (labelled in 2 places, with green rectangular boxes). Is there any way that I could fill these blanks (region of missing data) with some kind of interpolation, approaching from either end of the gap? Any other ideas would be appreciated? Thank you so much.
I have tried the function imclose (code attached below), but it was not helpful (see the output image below). I have attached my script for 'imclose' below. Thanks!
Script for 'imclose':
close all
clear all
% Use the imclose function to fill appropriate gaps in input image
figure
ima = gapClose('testimg.bmp',17,-82);
function [ima] = gapClose (imb, len, deg)
%% Input parameteres
% imb = Input image (image before gap completion is applied)
% Optional parameters (takes default values if left blank)
% len = length of the line for the function strel ('line')
% deg = orientation of the line (in degrees) for the function strel
% ima = Output image
imb = imread(imb);
% if len ==
se2 = strel('line', len, deg); % create line elements using 'strel'
ima=imclose(imb,se2); % apply imclose to fil the gaps
montage({imb,ima},'ThumbnailSize',[]) % display before and after images side by side
end
  댓글 수: 4
Jay Ghosh
Jay Ghosh 2022년 8월 15일
Any other ideas, anyone? Thanks!
Akira Agata
Akira Agata 2022년 8월 15일
편집: Akira Agata 2022년 8월 15일
The original (x,y,z) data (.xyz file) should have much more information than the attached binary image data.
Therefore, I think it would be better to start this analysis from the original (x,y,z) data.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by