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
acf7af6f
Commit
acf7af6f
authored
Jun 15, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented autoloading files in "restore" command for mixed-resolution
sensors
parent
d33f7855
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
20 deletions
+19
-20
Aberration_Calibration.java
...com/elphel/imagej/calibration/Aberration_Calibration.java
+11
-2
DistortionCalibrationData.java
.../elphel/imagej/calibration/DistortionCalibrationData.java
+3
-16
EyesisAberrations.java
...java/com/elphel/imagej/calibration/EyesisAberrations.java
+5
-2
No files found.
src/main/java/com/elphel/imagej/calibration/Aberration_Calibration.java
View file @
acf7af6f
...
...
@@ -2823,6 +2823,7 @@ if (MORE_BUTTONS) {
/* ======================================================================== */
if (label.equals("Reset Sensor")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
ABERRATIONS_PARAMETERS.sensorsPath = ""; // null;
if (LENS_DISTORTIONS==null) {
IJ.showMessage("LENS_DISTORTION is not set");
return;
...
...
@@ -10231,7 +10232,8 @@ if (MORE_BUTTONS) {
}
if ((LENS_DISTORTIONS.fittingStrategy != null) && ABERRATIONS_PARAMETERS.autoFilter) { // trying to fix restore
if (DEBUG_LEVEL>0) System.out.println("LENS_DISTORTIONS.fittingStrategy != null -> Extra after loading");
int minGridsNoPointer=1000;
int minGridsNoPointer=40; // 1000;
System.out.println("Using minGridsNoPointer="+minGridsNoPointer+", TODO: Use pattern grid size fraction?");
int [] numImages=DISTORTION_CALIBRATION_DATA.filterImages(
false, // resetHinted,
0, // 2, // minPointers,
...
...
@@ -10563,7 +10565,7 @@ if (MORE_BUTTONS) {
public boolean restoreFocusingHistory(boolean interactive){
if (!interactive && ((FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile==null) || (FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile.length()==0))){
System.out.println("*** No focusing history to load!");
System.out.println("*** No focusing history to load!
(used only for SFE focusing) ****
");
return false;
}
FOCUSING_FIELD=new FocusingField(
...
...
@@ -11050,12 +11052,16 @@ if (MORE_BUTTONS) {
}
distortions.fittingStrategy.debugLevel=debugLevel;
distortions.fittingStrategy.adjustNumberOfImages(dcd.gIP.length);
} else {
System.out.println("No fitting strategy is provided");
}
if (configPaths[2] !=null){ // load grid file
patternParameters.debugLevel=debugLevel;
patternParameters.updateStatus=updateStstus;
if (DEBUG_LEVEL>0) System.out.println("Autolading grid file "+configPaths[2]);
patternParameters.selectAndRestore(true,configPaths[2],dcd.eyesisCameraParameters.numStations); // returns path or null on failure
} else {
System.out.println("No pattern grid file (ground gtruth) is provided");
}
if ((configPaths[3] !=null) && (configPaths[3] != "")){ // load sensor
if (distortions.fittingStrategy==null) return false; // Why?
...
...
@@ -11067,6 +11073,9 @@ if (MORE_BUTTONS) {
aberrationParameters.autoRestoreSensorOverwriteOrientation,
aberrationParameters.autoRestoreSensorOverwriteDistortion
);
System.out.println("... overwriting subcamera parameters");
} else {
System.out.println("No sensor calibration files are provided");
}
return true;
}
src/main/java/com/elphel/imagej/calibration/DistortionCalibrationData.java
View file @
acf7af6f
...
...
@@ -1573,7 +1573,7 @@ if (sfiles == null) {
firstInterAxisAngle
=
this
.
gIS
[
i
].
interAxisAngle
;
sb
.
append
(
i
+
"\t"
+
IJ
.
d2s
(
this
.
gIS
[
i
].
timeStamp
,
6
));
if
(
this
.
eyesisCameraParameters
.
numStations
>
1
)
sb
.
append
(
i
+
"\t"
+
this
.
gIS
[
i
].
getStationNumber
());
if
(
this
.
eyesisCameraParameters
.
numStations
>
1
)
sb
.
append
(
"\t"
+
this
.
gIS
[
i
].
getStationNumber
());
sb
.
append
(
"\t"
+(
Double
.
isNaN
(
this
.
gIS
[
i
].
goniometerAxial
)?
"---"
:((
this
.
gIS
[
i
].
orientationEstimated
?
"("
:
""
)+
IJ
.
d2s
(
axial_corr_sign
,
3
)+(
this
.
gIS
[
i
].
orientationEstimated
?
")"
:
""
))));
sb
.
append
(
"\t"
+(
Double
.
isNaN
(
this
.
gIS
[
i
].
goniometerTilt
)?
"---"
:((
this
.
gIS
[
i
].
orientationEstimated
?
"("
:
""
)+
IJ
.
d2s
(
this
.
gIS
[
i
].
goniometerTilt
,
3
)+(
this
.
gIS
[
i
].
orientationEstimated
?
")"
:
""
))));
...
...
@@ -2564,20 +2564,7 @@ if (sfiles == null) {
updateSetOrientation
(
null
);
// update orientation of image sets (built in readAllGrids() UPDATE - not anymore)
}
/*
public DistortionCalibrationData(
String pathname,
PatternParameters patternParameters,
EyesisCameraParameters eyesisCameraParameters) {
setFromXML(
pathname,
eyesisCameraParameters);
System.out.println("DistortionCalibrationData("+pathname+",eyesisCameraParameters) 1 -> this.gIS.length="+((this.gIS==null)?"null":this.gIS.length));
readAllGrids(patternParameters); // prepare grid parameters for LMA (now will preserve this.gIS if it is non-null)
System.out.println("DistortionCalibrationData("+pathname+",eyesisCameraParameters) 2 -> this.gIS.length="+((this.gIS==null)?"null":this.gIS.length));
updateSetOrientation(null); // update orientation of image sets (built in readAllGrids())
}
*/
public
void
setFromXML
(
String
pathname
,
EyesisCameraParameters
eyesisCameraParameters
,
// should have cartesian set
EyesisAberrations
.
AberrationParameters
aberrationParameters
)
{
...
...
@@ -3036,7 +3023,7 @@ if (sfiles == null) {
System
.
out
.
println
(
"readAllGrids(), numImages="
+
numImages
+
", total number of grid nodes="
+
numOfGridNodes
+
", unused nodes "
+
numOfGridNodes_extra
);
}
// probably - do not need to verify that this.gIS is null - should do that anyway. UPDATE: no, now reading config file creates gIS
buildImageSets
(
this
.
gIS
!=
null
);
buildImageSets
(
this
.
gIS
!=
null
);
// with non-null just copies motors from any of the images that has it
return
true
;
}
...
...
src/main/java/com/elphel/imagej/calibration/EyesisAberrations.java
View file @
acf7af6f
...
...
@@ -4745,7 +4745,9 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
return
result
;
}
public
boolean
[]
getChannelSelection
(
Distortions
distortions
){
if
(
distortions
==
null
)
return
null
;
if
((
distortions
==
null
)
||
(
distortions
.
fittingStrategy
==
null
)
||
(
distortions
.
fittingStrategy
.
distortionCalibrationData
==
null
))
return
null
;
int
numChannels
=
distortions
.
fittingStrategy
.
distortionCalibrationData
.
getNumChannels
();
// number of used channels
if
(
this
.
selectedChannels
==
null
)
{
this
.
selectedChannels
=
new
boolean
[
1
];
...
...
@@ -4762,8 +4764,9 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
}
public
boolean
selectChannelsToProcess
(
String
title
,
Distortions
distortions
)
{
boolean
[]
newSelecttion
=
getChannelSelection
(
distortions
).
clone
();
//java.lang.NullPointerException
boolean
[]
newSelecttion
=
getChannelSelection
(
distortions
)
;
//
.clone(); //java.lang.NullPointerException
if
(
newSelecttion
==
null
)
return
false
;
newSelecttion
=
newSelecttion
.
clone
();
int
numChannels
=
newSelecttion
.
length
;
while
(
true
)
{
GenericDialog
gd
=
new
GenericDialog
(
title
);
...
...
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