Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 13342833 authored by DIB Elian's avatar DIB Elian
Browse files

Removed necessity to provide disparity information in getSR

parent 51be8642
No related branches found
No related tags found
No related merge requests found
function [SRRef,SRDisp] = getSR(LFRef,LFDisp,SRXq,SRYq,Method)
function [SRRef,SRDisp] = getSR(LFRef,SRXq,SRYq,Method,LFDisp)
%GETSR Summary of this function goes here
% Detailed explanation goes here
......@@ -18,6 +18,9 @@ numLab = numel(SRXq);
% Initialize super-ray fields
[SROff,SRCol,SRLab,SRDisp] = deal(cell(numLab,1));
% Initialize disparity if unavailable
if ~exist('LFDisp','var'); LFDisp = zeros(LFSize); end
% Pad values
Color = padarray(Color,[1,1,0,0,0],nan,'both');
Label = padarray(Label,[1,1,0,0,0],nan,'both');
......@@ -111,18 +114,18 @@ for lab = 1:numLab
SRCol{lab}(:,:,c,v) = temp;
end
% Interpolate disparity
LFDispsub = LFDisp(mgv{:},v);
temp = interp2(LFYsub,LFXsub,LFDispsub,Yq,Xq,Method);
temp(M) = nan;
SRDisp{lab}(:,:,:,v) = temp;
% Interpolate label
Labelsub = Label(mgv{:},v);
temp = interp2(LFYsub,LFXsub,Labelsub,Yq,Xq,'nearest');
temp(M) = nan;
Lab = temp;
% Interpolate disparity
LFDispsub = LFDisp(mgv{:},v);
temp = interp2(LFYsub,LFXsub,LFDispsub,Yq,Xq,Method);
temp(M) = nan;
SRDisp{lab}(:,:,:,v) = temp;
% Replace out of boundary values in label using cubic interpolation
NaNLab = isnan(interp2(LFYsub,LFXsub,Labelsub,Yq,Xq,'cubic'));
Lab(NaNLab) = nan;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment