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
Show more breadcrumbs
LightFieldCodingLibrary
SR
Commits
1fec2587
Commit
1fec2587
authored
6 years ago
by
DIB Elian
Browse files
Options
Downloads
Patches
Plain Diff
Fix wrong arguments in join function
Support for scalar disparity
parent
f71cf55d
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
join.m
+12
-11
12 additions, 11 deletions
join.m
with
12 additions
and
11 deletions
join.m
+
12
−
11
View file @
1fec2587
...
...
@@ -39,9 +39,9 @@ LFEnd = LFPos+LFSize;
LFEndX
=
LFEnd
(
3
);
LFEndY
=
LFEnd
(
4
);
% Initialize lightfield
[
LFVal
,
LFDisp
,
LFLab
]
=
deal
(
nan
(
LFSize
)
)
;
LFVal
=
nan
(
LFSize
);
LFBuf
=
zeros
(
LFSize
);
LFSet
=
SR
.
FieldsToSet
(
LFVal
,
LF
Pos
,
LFLab
,
LFDisp
,
LFDisp
);
LFSet
=
SR
.
FieldsToSet
(
LFVal
,
LF
Buf
,
LFPos
,
LFVal
,
LFVal
);
dispsx
=
cellfun
(
@
(
x
)
median
(
x
(:)),
DisparityX
);
dispsy
=
cellfun
(
@
(
x
)
median
(
x
(:)),
DisparityY
);
...
...
@@ -62,10 +62,18 @@ for lab = sortedLab
SRVal
=
Value
{
lab
};
SRPos
=
Position
{
lab
};
SRLab
=
Label
{
lab
};
SRDispX
=
DisparityX
{
lab
};
SRDispY
=
DisparityY
{
lab
};
SRSize
=
size
(
SRVal
);
% Mask corresponding to (super-ray) pixels to be mapped
if
Copy
SRMask
=
true
(
SRSize
);
else
SRMask
=
SRLab
==
lab
;
end
SRDispX
=
double
(
SRMask
)
.*
DisparityX
{
lab
};
SRDispY
=
double
(
SRMask
)
.*
DisparityY
{
lab
};
%SRPosU = SRPos(1); SRPosV = SRPos(2);
SRPosX
=
SRPos
(
3
);
SRPosY
=
SRPos
(
4
);
...
...
@@ -75,13 +83,6 @@ for lab = sortedLab
xgv
=
reshape
(
1
:
SRSize
(
3
),
1
,
1
,[]);
ygv
=
reshape
(
1
:
SRSize
(
4
),
1
,
1
,
1
,[]);
% Mask corresponding to (super-ray) pixels to be mapped
if
Copy
SRMask
=
true
(
SRSize
);
else
SRMask
=
SRLab
==
lab
;
end
% Super-ray coordinates in super-ray reference frame
[
SRU
,
SRV
,
SRX
,
SRY
]
=
ndgrid
(
ugv
,
vgv
,
xgv
,
ygv
);
...
...
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