Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
6315c513
Commit
6315c513
authored
Jan 20, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed far-far objects behind backdrop
parent
b36a0561
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
TexturedModel.java
...n/java/com/elphel/imagej/tileprocessor/TexturedModel.java
+8
-4
TileCluster.java
...ain/java/com/elphel/imagej/tileprocessor/TileCluster.java
+8
-2
TriMesh.java
src/main/java/com/elphel/imagej/x3d/export/TriMesh.java
+5
-2
No files found.
src/main/java/com/elphel/imagej/tileprocessor/TexturedModel.java
View file @
6315c513
...
@@ -1986,9 +1986,13 @@ public class TexturedModel {
...
@@ -1986,9 +1986,13 @@ public class TexturedModel {
boolean
[]
scan_selected
=
tileClusters
[
nslice
].
getSubSelected
(
sub_i
);
// limited to cluster bounds
boolean
[]
scan_selected
=
tileClusters
[
nslice
].
getSubSelected
(
sub_i
);
// limited to cluster bounds
int
[]
scan_border_int
=
tileClusters
[
nslice
].
getSubBorderInt
(
sub_i
);
// limited to cluster bounds
int
[]
scan_border_int
=
tileClusters
[
nslice
].
getSubBorderInt
(
sub_i
);
// limited to cluster bounds
int
max_border
=
tileClusters
[
nslice
].
getBorderIntMax
();
int
max_border
=
tileClusters
[
nslice
].
getBorderIntMax
();
boolean
is_sky
=
tileClusters
[
nslice
].
isSky
(
);
boolean
is_sky
=
tileClusters
[
nslice
].
isSky
(
sub_i
);
double
min_disparity
=
is_sky
?
infinity_disparity
:
min_obj_disparity
;
double
min_disparity
=
is_sky
?
infinity_disparity
:
min_obj_disparity
;
if
(
debugLevel
>
-
2
){
System
.
out
.
println
(
"nslice="
+
nslice
+
" cluster #"
+
cluster_index
+
" is_sky="
+
is_sky
+
" min_disparity="
+
min_disparity
);
}
// cluster_index
// skipping averaging disparity for a whole cluster (needs strength and does not seem to be useful)
// skipping averaging disparity for a whole cluster (needs strength and does not seem to be useful)
try
{
try
{
if
(
alpha
==
null
)
{
if
(
alpha
==
null
)
{
...
@@ -2045,7 +2049,7 @@ public class TexturedModel {
...
@@ -2045,7 +2049,7 @@ public class TexturedModel {
((
dbg_mesh_imgs
!=
null
)
?
dbg_mesh_imgs
[
nslice
]:
null
),
// double [] tri_img, //
((
dbg_mesh_imgs
!=
null
)
?
dbg_mesh_imgs
[
nslice
]:
null
),
// double [] tri_img, //
dbg_scaled_width
,
// int tri_img_width,
dbg_scaled_width
,
// int tri_img_width,
// FIXME: make a separate parameter:
// FIXME: make a separate parameter:
infinity_disparity
,
//
min_disparity, // infinity_disparity, // 0.25 * clt_parameters.bgnd_range, // 0.3
min_disparity
,
// infinity_disparity, //
min_disparity, // infinity_disparity, // 0.25 * clt_parameters.bgnd_range, // 0.3
clt_parameters
.
grow_disp_max
,
// other_range, // 2.0 'other_range - difference from the specified (*_CM)
clt_parameters
.
grow_disp_max
,
// other_range, // 2.0 'other_range - difference from the specified (*_CM)
clt_parameters
.
maxDispTriangle
,
clt_parameters
.
maxDispTriangle
,
clt_parameters
.
maxZtoXY
,
// double maxZtoXY, // 10.0. <=0 - do not use
clt_parameters
.
maxZtoXY
,
// double maxZtoXY, // 10.0. <=0 - do not use
...
@@ -3623,7 +3627,7 @@ public class TexturedModel {
...
@@ -3623,7 +3627,7 @@ public class TexturedModel {
int
sky_slice
=
-
1
;
int
sky_slice
=
-
1
;
int
sky_subindex
=
-
1
;
int
sky_subindex
=
-
1
;
for
(
int
i
=
0
;
i
<
tileClusters
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
tileClusters
.
length
;
i
++)
{
sky_subindex
=
tileClusters
[
i
].
getSkyClusterIndex
();
sky_subindex
=
tileClusters
[
i
].
getSkyClusterIndex
();
// finds first sky only!
if
(
sky_subindex
>=
0
)
{
if
(
sky_subindex
>=
0
)
{
sky_slice
=
i
;
sky_slice
=
i
;
break
;
break
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/TileCluster.java
View file @
6315c513
...
@@ -96,8 +96,14 @@ class TileCluster{
...
@@ -96,8 +96,14 @@ class TileCluster{
public
boolean
isSky
()
{
public
boolean
isSky
()
{
return
is_sky
;
return
is_sky
;
}
}
public
boolean
isSky
(
int
sub
)
{
if
(
clust_list
==
null
)
{
return
is_sky
;
}
return
clust_list
.
get
(
sub
).
is_sky
;
}
public
int
getSkyClusterIndex
()
{
public
int
getSkyClusterIndex
()
{
// currently (need to fix) there can be multiple sky clusters !
if
(
clust_list
==
null
)
{
if
(
clust_list
==
null
)
{
return
-
2
;
return
-
2
;
}
}
...
...
src/main/java/com/elphel/imagej/x3d/export/TriMesh.java
View file @
6315c513
...
@@ -1489,8 +1489,11 @@ public class TriMesh {
...
@@ -1489,8 +1489,11 @@ public class TriMesh {
if
(
indices
[
btiley
][
btilex
]
!=
null
)
{
if
(
indices
[
btiley
][
btilex
]
!=
null
)
{
int
subdiv
=
indices
[
btiley
][
btilex
].
length
;
int
subdiv
=
indices
[
btiley
][
btilex
].
length
;
double
disp
=
disparity
[
tile
];
double
disp
=
disparity
[
tile
];
if
(
disp
<
min_disparity
)
disp
=
min_disparity
;
if
(
disp
<
min_disparity
)
{
else
if
(
disp
>
max_disparity
)
disp
=
max_disparity
;
disp
=
min_disparity
;
}
else
if
(
disp
>
max_disparity
)
{
disp
=
max_disparity
;
}
for
(
int
y
=
0
;
y
<
indices
[
btiley
][
btilex
].
length
;
y
++)
{
for
(
int
y
=
0
;
y
<
indices
[
btiley
][
btilex
].
length
;
y
++)
{
for
(
int
x
=
0
;
x
<
indices
[
btiley
][
btilex
][
y
].
length
;
x
++)
{
for
(
int
x
=
0
;
x
<
indices
[
btiley
][
btilex
][
y
].
length
;
x
++)
{
// TODO - linear interpolate disparity here
// TODO - linear interpolate disparity here
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment