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
0ef14ecf
Commit
0ef14ecf
authored
Dec 09, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabled (optionally) alpha in textures, starting subdividing triangular
mesh instead
parent
8c67ed14
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
88 deletions
+144
-88
ExtrinsicAdjustment.java
.../com/elphel/imagej/tileprocessor/ExtrinsicAdjustment.java
+1
-0
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+4
-2
TexturedModel.java
...n/java/com/elphel/imagej/tileprocessor/TexturedModel.java
+126
-80
TileNeibs.java
src/main/java/com/elphel/imagej/tileprocessor/TileNeibs.java
+7
-2
TilePlanes.java
...main/java/com/elphel/imagej/tileprocessor/TilePlanes.java
+6
-4
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ExtrinsicAdjustment.java
View file @
0ef14ecf
...
...
@@ -1996,6 +1996,7 @@ public class ExtrinsicAdjustment {
// find largest terrain area
int
[]
iterrains
=
tn
.
enumerateClusters
(
terrain
,
// boolean [] tiles,
null
,
// int [] num_clusters,
true
);
//boolean ordered)
boolean
[]
terrain_main
=
new
boolean
[
clusters
];
for
(
int
i
=
0
;
i
<
clusters
;
i
++)
{
...
...
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
0ef14ecf
...
...
@@ -11761,7 +11761,8 @@ public class OpticalFlow {
int
[]
clusters
=
tn
.
enumerateClusters
(
over_thresh
,
// boolean [] tiles,
false
);
// boolean ordered)
null
,
// int [] num_clusters,
false
);
// boolean ordered)
// check clusters contain super-threshold tile
double
max_cluster
=
mov_thresh
*
mov_clust_max
;
// each cluster should have larger tile value to survive
int
max_clust_num
=
0
;
...
...
@@ -11829,7 +11830,8 @@ public class OpticalFlow {
clusters
=
tn
.
enumerateClusters
(
move_mask
,
// boolean [] tiles,
false
);
// boolean ordered)
null
,
// int [] num_clusters,
false
);
// boolean ordered)
if
(
show_debug_images
)
{
for
(
int
nTile
=
0
;
nTile
<
motion
.
length
;
nTile
++)
if
(
clusters
[
nTile
]
>
0
){
dbg_img
[
8
][
nTile
]
=
clusters
[
nTile
];
...
...
src/main/java/com/elphel/imagej/tileprocessor/TexturedModel.java
View file @
0ef14ecf
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/TileNeibs.java
View file @
0ef14ecf
...
...
@@ -615,12 +615,14 @@ public class TileNeibs{
/**
* Enumerate clusters on rectangular area
* @param tiles selected tiles, size should be sizeX * sizeY
* @param ordered if true, order tiles from largest to smallest5
* @param tiles selected tiles, size should be sizeX * sizeY
* @param num_clusters if non null, will return number of clusters
* @param ordered if true, order tiles from largest to smallest5
* @return integer array, where 0 is unused, 1+ cluster it belongs to
*/
public
int
[]
enumerateClusters
(
boolean
[]
tiles
,
int
[]
num_clusters
,
boolean
ordered
)
{
int
[]
waves
=
new
int
[
tiles
.
length
];
...
...
@@ -652,6 +654,9 @@ public class TileNeibs{
}
}
}
if
(
num_clusters
!=
null
)
{
num_clusters
[
0
]
=
numClust
;
}
if
(!
ordered
)
{
return
enum_clust
;
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/TilePlanes.java
View file @
0ef14ecf
...
...
@@ -5656,11 +5656,12 @@ public class TilePlanes {
boolean
[]
grown_sel
=
selections
[
np
].
clone
();
tileNeibs
.
growSelection
(
//
max_grow_these
,
// int grow, // grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
grown_sel
,
// boolean [] tiles,
null
);
// boolean [] prohibit,
grown_sel
,
// boolean [] tiles,
null
);
// boolean [] prohibit,
int
[]
clusters
=
tileNeibs
.
enumerateClusters
(
grown_sel
,
// boolean [] tiles,
false
);
// boolean ordered)
null
,
// int [] num_clusters,
false
);
// boolean ordered)
int
num_clusters
=
TileNeibs
.
getMax
(
clusters
);
// int [] data)
...
...
@@ -5698,7 +5699,8 @@ public class TilePlanes {
int
[]
dbg_clusters
=
clusters
.
clone
();
clusters
=
tileNeibs
.
enumerateClusters
(
grown_sel
,
// boolean [] tiles,
false
);
// boolean ordered)
null
,
// int [] num_clusters,
false
);
// boolean ordered)
num_clusters
=
TileNeibs
.
getMax
(
clusters
);
if
(
num_clusters
>
1
){
...
...
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