필터 지우기
필터 지우기

Combine multiple objects to create Super Sampled representation

조회 수: 8 (최근 30일)
Jason
Jason 2023년 10월 16일
댓글: Matt J 2023년 10월 23일
Hi, I have an image consisting of holes and want to create a "composite" representation by combining all of them.
I believe the idea is that because the centroid of each on jitters (i.e. is not in exactly the same location as seen by the red dots), its possible to to use this to create a super resolved reconstruction. As far as I udnerstand, I can for example consider 1/2 pixel and hence create a 18x18 (sub pixel) image from this 9x9 pixel image. So I need to start at the centroid and step 1/2 pixel away and record the actual real pixel value and then populate this in the 18x18 array. I do this for all 3 and then I can for example take the median on a pixel basis.
The problem is, considering the 1st image, Im not sure how to get the 1/2 pixel values from the centroid to then fill in the 18x18 array.
any pointers would be appreciated.
Thanks
Jason
  댓글 수: 12
Jason
Jason 2023년 10월 18일
편집: Jason 2023년 10월 18일
Trying out Matt's suggestion of griddata
% Use grid data to interpolate sub pixel values but use
%"nearest"
x=1:sx;
y=1:sy;
v=I(y,x);
%Create query points
[xq,yq] = meshgrid(1:0.5:sx);
z1 = griddata(x,y,v,xq,yq,'nearest');
figure
plot3(x,y,v,'mo');
hold on
s=mesh(xq,yq,z1);
s.FaceColor = 'flat';
s.EdgeColor='k';
view(0,90)
Seems to be a step forward, but still not there.
  1. Not sure why the original image locations (magenta) are not shwoing correctly
  2. Nor is it "referenced" to the real centroid (red spot)
Matt J
Matt J 2023년 10월 22일
편집: Matt J 2023년 10월 23일
Hi Matt, thanks for your thoughts. As I understand this is very similar to the slanted edge MTF where the slant gives you the ability to super resolve.
But in that scenario, people are normally curve fitting. They assume that the LSF is a Gaussian lobe or a spline or something like that. That's why I asked you to begin with whether there was a parametric surface model that the samples are supposed to follow.

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

채택된 답변

Matt J
Matt J 2023년 10월 22일
편집: Matt J 2023년 10월 23일
Here's an algebraic solution in which we model the blobs as circularly symmetric with a radial profile parametrized by cubic splines. The code assumes NxN image data with N odd and requires that you download func2mat from,
IM=load('CoarseImages').IM;
K=numel(IM);
N=length(IM{1});
Rad=(N-1)/2; %Lobe radius
obj=lobeFitter(Rad,Rad+1);
%Build equation matrix, A
tic;
A=cell(K,1);
c0=ones(1,obj.ncoeff);
for k=1:K
t=obj.displacement(IM{k});
A{k}=func2mat(@(c) obj.radialInterp(c,N,t),c0,'doSparse',0);
end
A=cell2mat(A); %final equation matrix
c=A\reshape([IM{:}],[],1); %compute spline coefficients, c, algebraically
toc
Elapsed time is 0.110118 seconds.
IMsuper = obj.getLobe(c,N,2); %Super-res image upsampled by 2
tiledlayout(1,2);
nexttile, imshow(IM{1},[]);
nexttile, imshow(IMsuper,[]);
  댓글 수: 5
Jason
Jason 2023년 10월 23일
편집: Jason 2023년 10월 23일
Yes your right, I was going to upsample first, then centroid, recentre each one with this finer centroid and then combine them.
Matt J
Matt J 2023년 10월 23일
If so, you don't really need FFTs. You could just use imresize.

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

추가 답변 (0개)

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by