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
f04c3e13
Commit
f04c3e13
authored
Dec 28, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-implemented LMA, found problem in the original one
parent
9898d7a6
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1173 additions
and
216 deletions
+1173
-216
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+6
-0
Eyesis_Correction.java
src/main/java/Eyesis_Correction.java
+1
-1
FactorConvKernel.java
src/main/java/FactorConvKernel.java
+1166
-215
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
f04c3e13
...
@@ -1663,6 +1663,7 @@ public class EyesisCorrectionParameters {
...
@@ -1663,6 +1663,7 @@ public class EyesisCorrectionParameters {
public
double
dbg_y1
=
0
;
public
double
dbg_y1
=
0
;
public
double
dbg_sigma
=
2.0
;
public
double
dbg_sigma
=
2.0
;
public
String
dbg_mask
=
".........:::::::::.........:::::::::......*..:::::*:::.........:::::::::........."
;
public
String
dbg_mask
=
".........:::::::::.........:::::::::......*..:::::*:::.........:::::::::........."
;
public
int
dbg_mode
=
1
;
// 0 - old LMA, 1 - new LMA
public
DCTParameters
(
int
dct_size
,
int
asym_size
,
int
asym_pixels
,
int
asym_distance
,
int
dct_window
,
double
compactness
,
int
asym_tax_free
)
{
public
DCTParameters
(
int
dct_size
,
int
asym_size
,
int
asym_pixels
,
int
asym_distance
,
int
dct_window
,
double
compactness
,
int
asym_tax_free
)
{
this
.
dct_size
=
dct_size
;
this
.
dct_size
=
dct_size
;
...
@@ -1689,6 +1690,7 @@ public class EyesisCorrectionParameters {
...
@@ -1689,6 +1690,7 @@ public class EyesisCorrectionParameters {
properties
.
setProperty
(
prefix
+
"dbg_y1"
,
this
.
dbg_y1
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_y1"
,
this
.
dbg_y1
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_sigma"
,
this
.
dbg_sigma
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_sigma"
,
this
.
dbg_sigma
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_mask"
,
this
.
dbg_mask
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_mask"
,
this
.
dbg_mask
+
""
);
properties
.
setProperty
(
prefix
+
"dbg_mode"
,
this
.
dbg_mode
+
""
);
}
}
public
void
getProperties
(
String
prefix
,
Properties
properties
){
public
void
getProperties
(
String
prefix
,
Properties
properties
){
...
@@ -1707,6 +1709,7 @@ public class EyesisCorrectionParameters {
...
@@ -1707,6 +1709,7 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"dbg_y1"
)!=
null
)
this
.
dbg_y1
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"dbg_y1"
));
if
(
properties
.
getProperty
(
prefix
+
"dbg_y1"
)!=
null
)
this
.
dbg_y1
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"dbg_y1"
));
if
(
properties
.
getProperty
(
prefix
+
"dbg_sigma"
)!=
null
)
this
.
dbg_sigma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"dbg_sigma"
));
if
(
properties
.
getProperty
(
prefix
+
"dbg_sigma"
)!=
null
)
this
.
dbg_sigma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"dbg_sigma"
));
if
(
properties
.
getProperty
(
prefix
+
"dbg_mask"
)!=
null
)
this
.
dbg_mask
=
properties
.
getProperty
(
prefix
+
"dbg_mask"
);
if
(
properties
.
getProperty
(
prefix
+
"dbg_mask"
)!=
null
)
this
.
dbg_mask
=
properties
.
getProperty
(
prefix
+
"dbg_mask"
);
if
(
properties
.
getProperty
(
prefix
+
"dbg_mode"
)!=
null
)
this
.
dbg_mode
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"dbg_mode"
));
}
}
public
boolean
showDialog
()
{
public
boolean
showDialog
()
{
GenericDialog
gd
=
new
GenericDialog
(
"Set DCT parameters"
);
GenericDialog
gd
=
new
GenericDialog
(
"Set DCT parameters"
);
...
@@ -1726,6 +1729,8 @@ public class EyesisCorrectionParameters {
...
@@ -1726,6 +1729,8 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"dbg_y1"
,
this
.
dbg_y1
,
2
);
//0..2
gd
.
addNumericField
(
"dbg_y1"
,
this
.
dbg_y1
,
2
);
//0..2
gd
.
addNumericField
(
"dbg_sigma"
,
this
.
dbg_sigma
,
3
);
//0..2
gd
.
addNumericField
(
"dbg_sigma"
,
this
.
dbg_sigma
,
3
);
//0..2
gd
.
addStringField
(
"Debug mask (anything but * is false)"
,
this
.
dbg_mask
,
100
);
gd
.
addStringField
(
"Debug mask (anything but * is false)"
,
this
.
dbg_mask
,
100
);
gd
.
addNumericField
(
"LMA implementation: 0 - old, 1 - new"
,
this
.
dbg_mode
,
0
);
//32
// gd.addNumericField("Debug Level:", MASTER_DEBUG_LEVEL, 0);
// gd.addNumericField("Debug Level:", MASTER_DEBUG_LEVEL, 0);
gd
.
showDialog
();
gd
.
showDialog
();
if
(
gd
.
wasCanceled
())
return
false
;
if
(
gd
.
wasCanceled
())
return
false
;
...
@@ -1744,6 +1749,7 @@ public class EyesisCorrectionParameters {
...
@@ -1744,6 +1749,7 @@ public class EyesisCorrectionParameters {
this
.
dbg_y1
=
gd
.
getNextNumber
();
this
.
dbg_y1
=
gd
.
getNextNumber
();
this
.
dbg_sigma
=
gd
.
getNextNumber
();
this
.
dbg_sigma
=
gd
.
getNextNumber
();
this
.
dbg_mask
=
gd
.
getNextString
();
this
.
dbg_mask
=
gd
.
getNextString
();
this
.
dbg_mode
=
(
int
)
gd
.
getNextNumber
();
// MASTER_DEBUG_LEVEL= (int) gd.getNextNumber();
// MASTER_DEBUG_LEVEL= (int) gd.getNextNumber();
return
true
;
return
true
;
...
...
src/main/java/Eyesis_Correction.java
View file @
f04c3e13
...
@@ -2835,7 +2835,7 @@ private Panel panel1,panel2,panel3,panel4,panel5,panel5a, panel6,panel7,panelPos
...
@@ -2835,7 +2835,7 @@ private Panel panel1,panel2,panel3,panel4,panel5,panel5a, panel6,panel7,panelPos
}
else
if
(
label
.
equals
(
"Test Kernel Factorization"
)){
}
else
if
(
label
.
equals
(
"Test Kernel Factorization"
)){
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
if
(!
DCT_PARAMETERS
.
showDialog
())
return
;
if
(!
DCT_PARAMETERS
.
showDialog
())
return
;
FactorConvKernel
factorConvKernel
=
new
FactorConvKernel
();
FactorConvKernel
factorConvKernel
=
new
FactorConvKernel
(
DCT_PARAMETERS
.
dbg_mode
==
1
);
factorConvKernel
.
setDebugLevel
(
DEBUG_LEVEL
);
factorConvKernel
.
setDebugLevel
(
DEBUG_LEVEL
);
factorConvKernel
.
numIterations
=
DCT_PARAMETERS
.
LMA_steps
;
factorConvKernel
.
numIterations
=
DCT_PARAMETERS
.
LMA_steps
;
factorConvKernel
.
setAsymCompactness
(
factorConvKernel
.
setAsymCompactness
(
...
...
src/main/java/FactorConvKernel.java
View file @
f04c3e13
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