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
d7dab33b
Commit
d7dab33b
authored
Jul 19, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added alignment statistics
parent
48ba44a4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
483 additions
and
2 deletions
+483
-2
Eyesis_Correction.java
src/main/java/Eyesis_Correction.java
+25
-1
GeometryCorrection.java
src/main/java/GeometryCorrection.java
+42
-1
TwoQuadCLT.java
src/main/java/TwoQuadCLT.java
+416
-0
No files found.
src/main/java/Eyesis_Correction.java
View file @
d7dab33b
...
...
@@ -84,7 +84,6 @@ import loci.formats.FormatException;
//import javax.swing.SwingUtilities;
//import javax.swing.UIManager;
public
class
Eyesis_Correction
extends
PlugInFrame
implements
ActionListener
{
/**
*
...
...
@@ -587,6 +586,7 @@ private Panel panel1,
addButton
(
"Rig offset"
,
panelClt4
,
color_configure
);
addButton
(
"Save offset"
,
panelClt4
,
color_process
);
addButton
(
"SHOW extrinsics"
,
panelClt4
,
color_configure
);
addButton
(
"LIST extrinsics"
,
panelClt4
,
color_configure
);
addButton
(
"RIG DSI"
,
panelClt4
,
color_conf_process
);
addButton
(
"MAIN extrinsics"
,
panelClt4
,
color_process
);
addButton
(
"AUX extrinsics"
,
panelClt4
,
color_process
);
...
...
@@ -4579,6 +4579,11 @@ private Panel panel1,
QuadCLT
dbg_QUAD_CLT_AUX
=
QUAD_CLT_AUX
;
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"LIST extrinsics"
))
{
listExtrinsics
();
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Reset GT"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
...
...
@@ -5580,6 +5585,25 @@ private Panel panel1,
return
true
;
}
// listExtrinsics();
public
boolean
listExtrinsics
()
{
String
dir
=
CalibrationFileManagement
.
selectDirectory
(
false
,
// true, // smart,
false
,
// newAllowed, // save
"Model directories to scan"
,
// title
"Select"
,
// button
null
,
// filter
CORRECTION_PARAMETERS
.
x3dDirectory
);
//this.sourceDirectory);
if
(
dir
!=
null
)
{
System
.
out
.
println
(
"top directory = "
+
dir
);
}
//listExtrinsics(String dir, String mask)
// if (TWO_QUAD_CLT == null) {
// return false;
// }
return
TwoQuadCLT
.
listExtrinsics
(
dir
);
// , mask);
}
public
boolean
showDSI
()
{
if
(
TWO_QUAD_CLT
==
null
)
{
System
.
out
.
println
(
"TWO_QUAD_CLT is not initialized"
);
...
...
src/main/java/GeometryCorrection.java
View file @
d7dab33b
...
...
@@ -543,7 +543,7 @@ public class GeometryCorrection {
if
(
Double
.
isNaN
(
rms
))
{
System
.
out
.
println
(
"rms= NaN"
);
}
if
(
debugLevel
>-
4
)
{
System
.
out
.
println
(
"getRigCorrection(): Current RMS = "
+
rms
+
"(debugLevel= "
+
debugLevel
+
")"
);
};
...
...
@@ -953,6 +953,22 @@ public class GeometryCorrection {
System
.
out
.
println
(
" Relative zoom - difference from 1.0 in parts parts per 1/1000 "
+
(
par_scales
[
AUX_ZOOM_INDEX
]
*
this
.
aux_zoom
)
+
"pix"
);
}
public
double
getRigOffsetParameter
(
int
indx
,
boolean
inPix
)
{
if
((
indx
<
0.0
)
||
(
indx
>=
par_scales
.
length
)){
return
Double
.
NaN
;
}
double
k
=
inPix
?
par_scales
[
indx
]
:
1.0
;
switch
(
indx
)
{
case
AUX_AZIMUTH_INDEX:
return
k
*
this
.
aux_azimuth
;
case
AUX_TILT_INDEX:
return
k
*
this
.
aux_tilt
;
case
AUX_ROLL_INDEX:
return
k
*
this
.
aux_roll
;
case
AUX_ZOOM_INDEX:
return
k
*
this
.
aux_zoom
;
case
AUX_ANGLE_INDEX:
return
k
*
this
.
aux_angle
;
case
AUX_BASELINE_INDEX:
return
k
*
this
.
baseline
;
// if inPix - show rig baseline/main baseline
}
return
Double
.
NaN
;
}
}
...
...
@@ -967,6 +983,10 @@ public class GeometryCorrection {
this
.
rigOffset
.
showRigOffsets
();
}
public
double
getRigOffsetParameter
(
int
indx
,
boolean
inPix
)
{
return
this
.
rigOffset
.
getRigOffsetParameter
(
indx
,
inPix
);
}
public
boolean
setRigOffsetFromProperies
(
String
parent_prefix
,
Properties
properties
)
{
RigOffset
rigOffset
=
new
RigOffset
();
boolean
gotit
=
rigOffset
.
getProperties
(
parent_prefix
,
properties
);
...
...
@@ -1248,6 +1268,27 @@ public class GeometryCorrection {
{
return
vector
[
6
+
indx
]
+
roll
[
indx
]
*
Math
.
PI
/
180.0
;
}
/**
* Return parameter value for reports
* @param indx parameter index (use CorrVector.XXX static integers)
* @param inPix show result in pixels , false - in radians (even for zooms)
* @return parameter value
*/
public
double
getExtrinsicParameterValue
(
int
indx
,
boolean
inPix
)
{
if
(
indx
<
0
)
return
Double
.
NaN
;
if
(
indx
<
ROLL_INDEX
)
return
vector
[
indx
]*
(
inPix
?
(
1000.0
*
focalLength
/
pixelSize
):
1.0
);
// tilt and azimuth
if
(
indx
<
LENGTH_ANGLES
)
return
vector
[
indx
]*
(
inPix
?
(
1000.0
*
distortionRadius
/
pixelSize
):
1.0
);
// rolls
if
(
indx
<
LENGTH
)
return
vector
[
indx
]*
(
inPix
?
(
1000.0
*
distortionRadius
/
pixelSize
):
1.0
);
// zooms
return
Double
.
NaN
;
}
public
double
getExtrinsicSymParameterValue
(
int
indx
,
boolean
inPix
)
{
double
[]
sym_vect
=
toSymArray
(
null
);
if
(
indx
<
0
)
return
Double
.
NaN
;
if
(
indx
<
ROLL_INDEX
)
return
sym_vect
[
indx
]*
(
inPix
?
(
1000.0
*
focalLength
/
pixelSize
):
1.0
);
// tilt and azimuth
if
(
indx
<
LENGTH_ANGLES
)
return
sym_vect
[
indx
]*
(
inPix
?
(
1000.0
*
distortionRadius
/
pixelSize
):
1.0
);
// rolls
if
(
indx
<
LENGTH
)
return
sym_vect
[
indx
]*
(
inPix
?
(
1000.0
*
distortionRadius
/
pixelSize
):
1.0
);
// zooms
return
Double
.
NaN
;
}
@Override
public
String
toString
()
...
...
src/main/java/TwoQuadCLT.java
View file @
d7dab33b
This diff is collapsed.
Click to expand it.
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