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
d152fbaa
Commit
d152fbaa
authored
Oct 03, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring
parent
7506079e
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
92 deletions
+178
-92
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+74
-22
VegetationLMA.java
...main/java/com/elphel/imagej/vegetation/VegetationLMA.java
+18
-8
VegetationModel.java
...in/java/com/elphel/imagej/vegetation/VegetationModel.java
+85
-61
VegetationSegment.java
.../java/com/elphel/imagej/vegetation/VegetationSegment.java
+1
-1
No files found.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
d152fbaa
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/vegetation/VegetationLMA.java
View file @
d152fbaa
...
@@ -1512,7 +1512,7 @@ public class VegetationLMA {
...
@@ -1512,7 +1512,7 @@ public class VegetationLMA {
for
(
int
n
=
0
;
n
<
4
;
n
++)
{
for
(
int
n
=
0
;
n
<
4
;
n
++)
{
for
(
int
i
=
0
;
(
i
<
indices
[
n
].
length
)
&&
(
i
<
par_index
[
n
].
length
);
i
++)
{
for
(
int
i
=
0
;
(
i
<
indices
[
n
].
length
)
&&
(
i
<
par_index
[
n
].
length
);
i
++)
{
int
indx
=
i
;
int
indx
=
i
;
if
(
n
<
3
)
{
if
(
n
<
TVAO_SCENE_OFFSET
)
{
int
w
=
i
%
woi
.
width
;
int
w
=
i
%
woi
.
width
;
int
h
=
i
/
woi
.
width
;
int
h
=
i
/
woi
.
width
;
indx
=
(
h
+
woi
.
y
)
*
full
.
width
+
(
w
+
woi
.
x
);
indx
=
(
h
+
woi
.
y
)
*
full
.
width
+
(
w
+
woi
.
x
);
...
@@ -1520,7 +1520,11 @@ public class VegetationLMA {
...
@@ -1520,7 +1520,11 @@ public class VegetationLMA {
int
pindx
=
par_index
[
n
][
indx
];
int
pindx
=
par_index
[
n
][
indx
];
indices
[
n
][
i
]
=
pindx
;
indices
[
n
][
i
]
=
pindx
;
if
(
pindx
<
0
)
{
if
(
pindx
<
0
)
{
if
(
n
==
TVAO_SCENE_OFFSET
)
{
data
[
n
][
i
]
=
Double
.
NaN
;
}
else
{
data
[
n
][
i
]
=
tvao
[
n
][
indx
];
data
[
n
][
i
]
=
tvao
[
n
][
indx
];
}
}
else
{
}
else
{
data
[
n
][
i
]
=
vector
[
pindx
];
data
[
n
][
i
]
=
vector
[
pindx
];
}
}
...
@@ -1644,9 +1648,17 @@ public class VegetationLMA {
...
@@ -1644,9 +1648,17 @@ public class VegetationLMA {
}
}
}
}
// Trim data to actiual
// Trim data to actiual
int
num_pars_scenes
=
Integer
.
parseInt
((
String
)
imp_pars
.
getProperty
(
"NUM_PARS_SCENES"
));
// int num_pars_scenes = Integer.parseInt((String) imp_pars.getProperty("NUM_PARS_SCENES"));
double
[]
scene_offsets
=
new
double
[
num_pars_scenes
];
// double [] scene_offsets = new double [num_pars_scenes];
System
.
arraycopy
(
data
[
3
],
0
,
scene_offsets
,
0
,
num_pars_scenes
);
double
[]
scene_offsets
=
new
double
[
num_scenes
];
System
.
arraycopy
(
data
[
TVAO_SCENE_OFFSET
],
0
,
scene_offsets
,
0
,
scene_offsets
.
length
);
// temporary patch, later they will be NaNs already - Already done !
for
(
int
i
=
0
;
i
<
scene_offsets
.
length
;
i
++)
{
if
(
indices
[
TVAO_SCENE_OFFSET
][
i
]
<
0
)
{
data
[
TVAO_SCENE_OFFSET
][
i
]
=
Double
.
NaN
;
}
}
for
(
int
n
=
0
;
n
<
3
;
n
++)
{
for
(
int
n
=
0
;
n
<
3
;
n
++)
{
if
(
woi
.
width
*
woi
.
height
<
data
[
n
].
length
)
{
if
(
woi
.
width
*
woi
.
height
<
data
[
n
].
length
)
{
double
[]
d
=
new
double
[
woi
.
width
*
woi
.
height
];
double
[]
d
=
new
double
[
woi
.
width
*
woi
.
height
];
...
@@ -1655,8 +1667,6 @@ public class VegetationLMA {
...
@@ -1655,8 +1667,6 @@ public class VegetationLMA {
}
}
}
}
data
[
3
]
=
scene_offsets
;
data
[
3
]
=
scene_offsets
;
}
else
{
}
else
{
this
.
woi
=
woi
;
this
.
woi
=
woi
;
diff_offsets
=
Boolean
.
parseBoolean
((
String
)
imp_pars
.
getProperty
(
"DIFF_OFFSETS"
));
diff_offsets
=
Boolean
.
parseBoolean
((
String
)
imp_pars
.
getProperty
(
"DIFF_OFFSETS"
));
...
@@ -2030,7 +2040,7 @@ public class VegetationLMA {
...
@@ -2030,7 +2040,7 @@ public class VegetationLMA {
woi
);
// Rectangle file_woi)
woi
);
// Rectangle file_woi)
segments
[
n
]
=
new
VegetationSegment
(
segments
[
n
]
=
new
VegetationSegment
(
woi
,
// Rectangle woi,
woi
,
// Rectangle woi,
tvao
[
3
],
// datadouble [] scene_offsets,
tvao
[
TVAO_SCENE_OFFSET
],
// datadouble [] scene_offsets,
new
double
[][]
{
tvao
[
0
],
tvao
[
1
],
tvao
[
2
]});
// double [][] tva) {} {}
new
double
[][]
{
tvao
[
0
],
tvao
[
1
],
tvao
[
2
]});
// double [][] tva) {} {}
}
}
// sort in line-scan order
// sort in line-scan order
...
...
src/main/java/com/elphel/imagej/vegetation/VegetationModel.java
View file @
d152fbaa
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/vegetation/VegetationSegment.java
View file @
d152fbaa
...
@@ -8,7 +8,7 @@ public class VegetationSegment {
...
@@ -8,7 +8,7 @@ public class VegetationSegment {
public
double
[][]
tva
;
public
double
[][]
tva
;
public
VegetationSegment
(
public
VegetationSegment
(
Rectangle
woi
,
Rectangle
woi
,
double
[]
scene_offsets
,
double
[]
scene_offsets
,
// has NaNs
double
[][]
tva
)
{
double
[][]
tva
)
{
this
.
woi
=
woi
;
this
.
woi
=
woi
;
this
.
scene_offsets
=
scene_offsets
;
this
.
scene_offsets
=
scene_offsets
;
...
...
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