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
0a050e16
Commit
0a050e16
authored
Jul 31, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrinsic corrections
parent
fabeb071
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
816 additions
and
123 deletions
+816
-123
AlignmentCorrection.java
src/main/java/AlignmentCorrection.java
+409
-67
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+11
-4
GeometryCorrection.java
src/main/java/GeometryCorrection.java
+379
-51
ImageDtt.java
src/main/java/ImageDtt.java
+17
-1
No files found.
src/main/java/AlignmentCorrection.java
View file @
0a050e16
This diff is collapsed.
Click to expand it.
src/main/java/EyesisCorrectionParameters.java
View file @
0a050e16
...
...
@@ -2049,9 +2049,12 @@ public class EyesisCorrectionParameters {
public
double
ly_smpl_rms
=
0.2
;
// 1; // Maximal RMS of the remaining tiles in a sample
public
double
ly_disp_var
=
0.5
;
// 2; // Maximal full disparity difference to 8 neighbors
public
double
ly_inf_frac
=
0.5
;
// Relative weight of infinity calibration data
public
boolean
ly_on_scan
=
true
;
// Calculate and apply lazy eye correction after disparity scan
public
boolean
ly_inf_en
=
true
;
// Simultaneously correct disparity at infinity
public
boolean
ly_on_scan
=
true
;
// Calculate and apply lazy eye correction after disparity scan (poly or extrinsic)
public
boolean
ly_inf_en
=
true
;
// Simultaneously correct disparity at infinity (both poly and extrinsic)
public
boolean
ly_inf_force
=
false
;
// Force convergence correction during extrinsic, even with no infinity data
public
boolean
ly_poly
=
false
;
// Use polynomial correction, false - correct tilt/azimuth/roll of each sensor
// old fcorr parameters, reuse?
// public int fcorr_sample_size = 32; // Use square this size side to detect outliers
...
...
@@ -2675,6 +2678,7 @@ public class EyesisCorrectionParameters {
properties
.
setProperty
(
prefix
+
"ly_inf_frac"
,
this
.
ly_inf_frac
+
""
);
properties
.
setProperty
(
prefix
+
"ly_on_scan"
,
this
.
ly_on_scan
+
""
);
properties
.
setProperty
(
prefix
+
"ly_inf_en"
,
this
.
ly_inf_en
+
""
);
properties
.
setProperty
(
prefix
+
"ly_inf_force"
,
this
.
ly_inf_force
+
""
);
properties
.
setProperty
(
prefix
+
"ly_poly"
,
this
.
ly_poly
+
""
);
properties
.
setProperty
(
prefix
+
"corr_magic_scale"
,
this
.
corr_magic_scale
+
""
);
...
...
@@ -3251,6 +3255,7 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"ly_inf_frac"
)!=
null
)
this
.
ly_inf_frac
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"ly_inf_frac"
));
if
(
properties
.
getProperty
(
prefix
+
"ly_on_scan"
)!=
null
)
this
.
ly_on_scan
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"ly_on_scan"
));
if
(
properties
.
getProperty
(
prefix
+
"ly_inf_en"
)!=
null
)
this
.
ly_inf_en
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"ly_inf_en"
));
if
(
properties
.
getProperty
(
prefix
+
"ly_inf_force"
)!=
null
)
this
.
ly_inf_force
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"ly_inf_force"
));
if
(
properties
.
getProperty
(
prefix
+
"ly_poly"
)!=
null
)
this
.
ly_poly
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
" "
));
if
(
properties
.
getProperty
(
prefix
+
"corr_magic_scale"
)!=
null
)
this
.
corr_magic_scale
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"corr_magic_scale"
));
...
...
@@ -3840,8 +3845,9 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Maximal RMS of the remaining tiles in a sample"
,
this
.
ly_smpl_rms
,
3
);
gd
.
addNumericField
(
"Maximal full disparity difference to 8 neighbors"
,
this
.
ly_disp_var
,
3
);
gd
.
addNumericField
(
"Relative weight of infinity calibration data"
,
this
.
ly_inf_frac
,
3
);
gd
.
addCheckbox
(
"Calculate and apply lazy eye correction after disparity scan (need to repeat)"
,
this
.
ly_on_scan
);
gd
.
addCheckbox
(
"Use infinity disparity (disable if there is not enough of infinity data)"
,
this
.
ly_inf_en
);
gd
.
addCheckbox
(
"Calculate and apply lazy eye correction after disparity scan (poly or extrinsic), may repeat"
,
this
.
ly_on_scan
);
gd
.
addCheckbox
(
"Use infinity disparity (disable if there is not enough of infinity data), both poly and extrinsic"
,
this
.
ly_inf_en
);
gd
.
addCheckbox
(
"Force convergence correction during extrinsic, even with no infinity data"
,
this
.
ly_inf_force
);
gd
.
addCheckbox
(
"*Use polynomial correction, false - correct tilt/azimuth/roll of each sensor)"
,
this
.
ly_poly
);
gd
.
addMessage
(
"---"
);
// gd.addNumericField("Use square this size side to detect outliers", this.fcorr_sample_size, 0);
...
...
@@ -4455,6 +4461,7 @@ public class EyesisCorrectionParameters {
this
.
ly_inf_frac
=
gd
.
getNextNumber
();
this
.
ly_on_scan
=
gd
.
getNextBoolean
();
this
.
ly_inf_en
=
gd
.
getNextBoolean
();
this
.
ly_inf_force
=
gd
.
getNextBoolean
();
this
.
ly_poly
=
gd
.
getNextBoolean
();
// this.fcorr_sample_size= (int)gd.getNextNumber();
...
...
src/main/java/GeometryCorrection.java
View file @
0a050e16
This diff is collapsed.
Click to expand it.
src/main/java/ImageDtt.java
View file @
0a050e16
...
...
@@ -1220,8 +1220,10 @@ public class ImageDtt {
centersXY
[
ip
][
0
]
-=
shiftXY
[
ip
][
0
];
centersXY
[
ip
][
1
]
-=
shiftXY
[
ip
][
1
];
}
// TODO: use correction after disparity applied (to work for large disparity values)
if
(
fine_corr
!=
null
){
// old correction
/*
double tX = (2.0 * tileX)/tilesX - 1.0; // -1.0 to +1.0
double tY = (2.0 * tileY)/tilesY - 1.0; // -1.0 to +1.0
for (int ip = 0; ip < centersXY.length; ip++){
...
...
@@ -1235,6 +1237,20 @@ public class ImageDtt {
fine_corr[ip][d][4]*tY+
fine_corr[ip][d][5]);
}
*/
for
(
int
ip
=
0
;
ip
<
centersXY
.
length
;
ip
++){
double
[]
tXY
=
geometryCorrection
.
getRelativeCoords
(
centersXY
[
ip
]);
for
(
int
d
=
0
;
d
<
2
;
d
++)
{
centersXY
[
ip
][
d
]
-=
(
fine_corr
[
ip
][
d
][
0
]*
tXY
[
0
]*
tXY
[
0
]+
fine_corr
[
ip
][
d
][
1
]*
tXY
[
1
]*
tXY
[
1
]+
fine_corr
[
ip
][
d
][
2
]*
tXY
[
0
]*
tXY
[
1
]+
fine_corr
[
ip
][
d
][
3
]*
tXY
[
0
]+
fine_corr
[
ip
][
d
][
4
]*
tXY
[
1
]+
fine_corr
[
ip
][
d
][
5
]);
}
}
}
}
if
((
globalDebugLevel
>
-
1
)
&&
(
tileX
==
debug_tileX
)
&&
(
tileY
==
debug_tileY
)
&&
(
chn
==
2
))
{
...
...
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