Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
LightFieldCodingLibrary
SR
Commits
13342833
Commit
13342833
authored
5 years ago
by
DIB Elian
Browse files
Options
Downloads
Patches
Plain Diff
Removed necessity to provide disparity information in getSR
parent
51be8642
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
getSR.m
+10
-7
10 additions, 7 deletions
getSR.m
with
10 additions
and
7 deletions
getSR.m
+
10
−
7
View file @
13342833
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment