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
6733a12d
Commit
6733a12d
authored
Jun 03, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented LWIR grids calculation
parent
41b1b50e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9910 additions
and
9515 deletions
+9910
-9515
Aberration_Calibration.java
...com/elphel/imagej/calibration/Aberration_Calibration.java
+69
-62
EyesisAberrations.java
...java/com/elphel/imagej/calibration/EyesisAberrations.java
+7
-4
Goniometer.java
src/main/java/com/elphel/imagej/calibration/Goniometer.java
+23
-21
LensAdjustment.java
...in/java/com/elphel/imagej/calibration/LensAdjustment.java
+6
-3
MatchSimulatedPattern.java
.../com/elphel/imagej/calibration/MatchSimulatedPattern.java
+9270
-8975
SimulationPattern.java
...java/com/elphel/imagej/calibration/SimulationPattern.java
+524
-450
LwirReaderParameters.java
...ain/java/com/elphel/imagej/lwir/LwirReaderParameters.java
+11
-0
No files found.
src/main/java/com/elphel/imagej/calibration/Aberration_Calibration.java
View file @
6733a12d
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/calibration/EyesisAberrations.java
View file @
6733a12d
...
...
@@ -1278,10 +1278,11 @@ public class EyesisAberrations {
}
int
rslt
=
matchSimulatedPattern
.
calculateDistortions
(
null
,
// LwirReaderParameters lwirReaderParameters, // null is OK
distortionParameters
,
//
patternDetectParameters
,
patternDetectParameters
.
minGridPeriod
/
2
,
patternDetectParameters
.
maxGridPeriod
/
2
,
//
patternDetectParameters.minGridPeriod/2,
//
patternDetectParameters.maxGridPeriod/2,
simulParameters
,
colorComponents
.
equalizeGreens
,
imp
,
...
...
@@ -2709,7 +2710,8 @@ public class EyesisAberrations {
distortedPattern
[
2
],
//
simulParameters
.
subdiv
,
fft_size
,
simulParameters
.
center_for_g2
);
simulParameters
.
center_for_g2
,
false
);
//boolean mono
wVectors
[
0
][
0
]=
2.0
*
distortedPattern
[
0
][
0
]/
subpixel
;
wVectors
[
0
][
1
]=
2.0
*
distortedPattern
[
0
][
1
]/
subpixel
;
wVectors
[
1
][
0
]=
2.0
*
distortedPattern
[
1
][
0
]/
subpixel
;
...
...
@@ -2752,7 +2754,8 @@ public class EyesisAberrations {
simCorr
,
//
simulParameters
.
subdiv
,
fft_size
,
simulParameters
.
center_for_g2
);
simulParameters
.
center_for_g2
,
false
);
//boolean mono
}
// simul_pixels= simulationPattern.extractSimulPatterns (
simul_pixels
=
simulationPattern
.
extractSimulPatterns
(
...
...
src/main/java/com/elphel/imagej/calibration/Goniometer.java
View file @
6733a12d
...
...
@@ -665,11 +665,12 @@ horizontal axis:
boolean
noMessageBoxes
=
true
;
int
numAbsolutePoints
=
matchSimulatedPattern
.
calculateDistortions
(
null
,
// LwirReaderParameters lwirReaderParameters, // null is OK
// allow more of grid around pointers?
distortionParameters
,
//
this
.
patternDetectParameters
,
this
.
patternDetectParameters
.
minGridPeriod
/
2
,
this
.
patternDetectParameters
.
maxGridPeriod
/
2
,
//
this.patternDetectParameters.minGridPeriod/2,
//
this.patternDetectParameters.maxGridPeriod/2,
simulParameters
,
equalizeGreens
,
imp_eq
,
this
.
laserPointers
,
// null, //LASER_POINTERS, //
...
...
@@ -840,25 +841,26 @@ horizontal axis:
// matchSimulatedPatterns[numSensor].getChannel(images[numSensor])+" ");
int
numAbsolutePoints
=
this
.
matchSimulatedPatterns
[
numSensor
].
calculateDistortions
(
// allow more of grid around pointers?
distortionParameters
,
//
this
.
patternDetectParameters
,
this
.
patternDetectParameters
.
minGridPeriod
/
2
,
this
.
patternDetectParameters
.
maxGridPeriod
/
2
,
simulParameters
,
equalizeGreens
,
imp_eq
,
this
.
laserPointers
,
// null, //LASER_POINTERS, //
// LaserPointer laserPointer, //
// LaserPointer object or null
true
,
// don't care -removeOutOfGridPointers
null
,
// double [][][] hintGrid, // predicted grid array (or null)
0
,
// double hintGridTolerance, // allowed mismatch (fraction of period) or 0 - orientation only
threadsMax
,
updateStatus
,
debug_level
,
distortionParameters
.
loop_debug_level
,
// debug level
noMessageBoxes
);
null
,
// LwirReaderParameters lwirReaderParameters, // null is OK
// allow more of grid around pointers?
distortionParameters
,
//
this
.
patternDetectParameters
,
// this.patternDetectParameters.minGridPeriod/2,
// this.patternDetectParameters.maxGridPeriod/2,
simulParameters
,
equalizeGreens
,
imp_eq
,
this
.
laserPointers
,
// null, //LASER_POINTERS, //
// LaserPointer laserPointer, //
// LaserPointer object or null
true
,
// don't care -removeOutOfGridPointers
null
,
// double [][][] hintGrid, // predicted grid array (or null)
0
,
// double hintGridTolerance, // allowed mismatch (fraction of period) or 0 - orientation only
threadsMax
,
updateStatus
,
debug_level
,
distortionParameters
.
loop_debug_level
,
// debug level
noMessageBoxes
);
if
(
numAbsolutePoints
<=
0
)
{
// no pointers in this image
String
msg
=
"*** No laser pointers matched for "
+
images
[
numSensor
].
getTitle
()
+
" - they are needed for absolute grid positioning"
;
if
(
debug_level
>
0
)
System
.
out
.
println
(
"Warning: "
+
msg
);
...
...
src/main/java/com/elphel/imagej/calibration/LensAdjustment.java
View file @
6733a12d
...
...
@@ -99,6 +99,7 @@ public class LensAdjustment {
ImagePlus
imp_eq
=
matchSimulatedPattern
.
applyFlatField
(
imp
);
// will throw if image size mismatch
if
(
updating
)
{
double
maxActualCorr
=
matchSimulatedPattern
.
refineDistortionCorrelation
(
null
,
// LwirReaderParameters lwirReaderParameters, // null is OK
distortionParameters
,
//
patternDetectParameters
,
simulParameters
,
...
...
@@ -132,7 +133,8 @@ public class LensAdjustment {
System
.
out
.
println
(
"updateFocusGrid(), number of already defined grid cells (before distortions()) = "
+
matchSimulatedPattern
.
numDefinedCells
());
}
matchSimulatedPattern
.
distortions
(
null
,
// is not used in update mode
null
,
//LwirReaderParameters lwirReaderParameters, // null is OK
null
,
// final boolean [] triedIndices, // is not used in update mode
distortionParameters
,
//
patternDetectParameters
,
patternDetectParameters
.
minGridPeriod
/
2
,
...
...
@@ -157,10 +159,11 @@ public class LensAdjustment {
// matchSimulatedPattern.invalidateFlatFieldForGrid(); //Keep these!
// matchSimulatedPattern.invalidateFocusMask();
numAbsolutePoints
=
matchSimulatedPattern
.
calculateDistortions
(
// allow more of grid around pointers?
null
,
// LwirReaderParameters lwirReaderParameters, // null is OK
distortionParameters
,
//
patternDetectParameters
,
patternDetectParameters
.
minGridPeriod
/
2
,
patternDetectParameters
.
maxGridPeriod
/
2
,
//
patternDetectParameters.minGridPeriod/2,
//
patternDetectParameters.maxGridPeriod/2,
simulParameters
,
equalizeGreens
,
imp_eq
,
...
...
src/main/java/com/elphel/imagej/calibration/MatchSimulatedPattern.java
View file @
6733a12d
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/calibration/SimulationPattern.java
View file @
6733a12d
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/lwir/LwirReaderParameters.java
View file @
6733a12d
...
...
@@ -32,6 +32,7 @@ import java.util.Properties;
import
com.elphel.imagej.common.GenericJTabbedDialog
;
import
ij.ImagePlus
;
import
ij.Prefs
;
public
class
LwirReaderParameters
{
...
...
@@ -54,6 +55,7 @@ public class LwirReaderParameters {
protected
double
vnir_gain_rg
=
0.7705
;
// 1.116; halogen/fluorescent
protected
double
vnir_gain_bg
=
2.401
;
// 1.476;
protected
boolean
[]
selected_channels
=
{
true
,
true
,
true
,
true
,
true
,
true
,
true
,
true
};
protected
int
max_lwir_width
=
1024
;
//
/*
protected double [] vnir_exp_corr = {1.0, 1.0, 1.0, 1.0};
...
...
@@ -79,9 +81,18 @@ public class LwirReaderParameters {
protected
boolean
show_images
=
false
;
// --- interface methods
public
boolean
is_LWIR
(
int
width
)
{
return
width
<=
max_lwir_width
;
}
public
boolean
is_LWIR
(
ImagePlus
imp
){
return
is_LWIR
(
imp
.
getWidth
());
}
public
int
getDebugLevel
()
{
return
this
.
debug_level
;
}
public
void
setDebugLevel
(
int
level
)
{
this
.
debug_level
=
level
;
}
...
...
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