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
d457b908
Commit
d457b908
authored
Jul 09, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recovering from missing pattern detection
parent
a8bdd39e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
Aberration_Calibration.java
src/main/java/Aberration_Calibration.java
+10
-1
No files found.
src/main/java/Aberration_Calibration.java
View file @
d457b908
...
...
@@ -15355,7 +15355,9 @@ private double [][] jacobianByJacobian(double [][] jacobian, boolean [] mask) {
wVectors
[
1
][
0
]=
2.0
*
distortedPattern
[
1
][
0
]/
subpixel
;
wVectors
[
1
][
1
]=
2.0
*
distortedPattern
[
1
][
1
]/
subpixel
;
}
else
{
// approximate pattern grid and simulate it
double
[][]
distPatPars
=
matchSimulatedPattern
.
findPatternFromGrid
(
double
[][]
distPatPars
=
null
;
try
{
distPatPars
=
matchSimulatedPattern
.
findPatternFromGrid
(
x0
,
// top-left pixel of the square WOI
y0
,
size
,
// size of square (pixels)
...
...
@@ -15363,7 +15365,14 @@ private double [][] jacobianByJacobian(double [][] jacobian, boolean [] mask) {
false
,
// use linear approximation (instead of quadratic)
1.0
E
-
10
,
// thershold ratio of matrix determinant to norm for linear approximation (det too low - fail)
1.0
E
-
20
);
// thershold ratio of matrix determinant to norm for quadratic approximation (det too low - fail)
}
catch
(
Exception
e
){
System
.
out
.
println
(
"Failed findPatternFromGrid("
+
x0
+
","
+
y0
+
",...)"
);
}
if
(
distPatPars
==
null
)
return
null
;
if
((
distPatPars
[
0
].
length
<
6
)
||
(
distPatPars
[
1
].
length
<
6
)){
System
.
out
.
println
(
"Failure: findPatternFromGrid("
+
x0
+
","
+
y0
+
",...) returned only linear coeffitients"
);
return
null
;
}
int
[]
iUV
={(
int
)
Math
.
floor
(
distPatPars
[
0
][
2
]),(
int
)
Math
.
floor
(
distPatPars
[
1
][
2
])};
boolean
negative
=((
iUV
[
0
]^
iUV
[
1
])&
1
)!=
0
;
double
[]
simCorr
={
...
...
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