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
9a96473e
Commit
9a96473e
authored
Dec 09, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified distortion functions
parent
53924b9e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
334 additions
and
6 deletions
+334
-6
Distortions.java
src/main/java/Distortions.java
+12
-4
LensDistortionParameters.java
src/main/java/LensDistortionParameters.java
+322
-2
No files found.
src/main/java/Distortions.java
View file @
9a96473e
...
@@ -2780,7 +2780,7 @@ For each point in the image
...
@@ -2780,7 +2780,7 @@ For each point in the image
//matchSimulatedPattern
//matchSimulatedPattern
int
[]
fileUVShiftRot
=
dcd
.
gIP
[
numGridImage
].
getUVShiftRot
();
int
[]
fileUVShiftRot
=
dcd
.
gIP
[
numGridImage
].
getUVShiftRot
();
int
[]
extraUVShiftRot
=
matchSimulatedPattern
.
getUVShiftRot
(
true
);
// last shift/rotation during matching pattern, correct for zero shift
int
[]
extraUVShiftRot
=
matchSimulatedPattern
.
getUVShiftRot
(
true
);
// last shift/rotation during matching pattern, correct for zero shift
int
[]
extraDbg
=
matchSimulatedPattern
.
getUVShiftRot
(
false
);
//
int [] extraDbg=matchSimulatedPattern.getUVShiftRot(false);
int
[]
combinedUVShiftRot
=
matchSimulatedPattern
.
combineUVShiftRot
(
fileUVShiftRot
,
extraUVShiftRot
);
int
[]
combinedUVShiftRot
=
matchSimulatedPattern
.
combineUVShiftRot
(
fileUVShiftRot
,
extraUVShiftRot
);
dcd
.
gIP
[
numGridImage
].
setUVShiftRot
(
combinedUVShiftRot
);
dcd
.
gIP
[
numGridImage
].
setUVShiftRot
(
combinedUVShiftRot
);
System
.
out
.
println
(
"applyHintedGrids(): dcd.gIP["
+
numGridImage
+
"].hintedMatch="
+
dcd
.
gIP
[
numGridImage
].
hintedMatch
+
System
.
out
.
println
(
"applyHintedGrids(): dcd.gIP["
+
numGridImage
+
"].hintedMatch="
+
dcd
.
gIP
[
numGridImage
].
hintedMatch
+
...
@@ -2790,7 +2790,7 @@ For each point in the image
...
@@ -2790,7 +2790,7 @@ For each point in the image
System
.
out
.
println
(
"applyHintedGrids(): fileUVShiftRot= "
+
fileUVShiftRot
[
0
]+
"/"
+
fileUVShiftRot
[
1
]+
":"
+
fileUVShiftRot
[
2
]);
System
.
out
.
println
(
"applyHintedGrids(): fileUVShiftRot= "
+
fileUVShiftRot
[
0
]+
"/"
+
fileUVShiftRot
[
1
]+
":"
+
fileUVShiftRot
[
2
]);
System
.
out
.
println
(
" "
+
nonzero
+
"extraUVShiftRot= "
+
extraUVShiftRot
[
0
]+
"/"
+
extraUVShiftRot
[
1
]+
":"
+
extraUVShiftRot
[
2
]);
System
.
out
.
println
(
" "
+
nonzero
+
"extraUVShiftRot= "
+
extraUVShiftRot
[
0
]+
"/"
+
extraUVShiftRot
[
1
]+
":"
+
extraUVShiftRot
[
2
]);
System
.
out
.
println
(
" combinedUVShiftRot="
+
combinedUVShiftRot
[
0
]+
"/"
+
combinedUVShiftRot
[
1
]+
":"
+
combinedUVShiftRot
[
2
]);
System
.
out
.
println
(
" combinedUVShiftRot="
+
combinedUVShiftRot
[
0
]+
"/"
+
combinedUVShiftRot
[
1
]+
":"
+
combinedUVShiftRot
[
2
]);
System
.
out
.
println
(
" extraDbg="
+
extraDbg
[
0
]+
"/"
+
extraDbg
[
1
]+
":"
+
extraDbg
[
2
]);
//
System.out.println(" extraDbg="+extraDbg[0]+"/"+extraDbg[1]+":"+extraDbg[2]);
}
}
}
}
}
}
...
@@ -7035,8 +7035,8 @@ List calibration
...
@@ -7035,8 +7035,8 @@ List calibration
this
.
startTime
+=(
System
.
nanoTime
()-
startDialogTime
);
// do not count time used by the User.
this
.
startTime
+=(
System
.
nanoTime
()-
startDialogTime
);
// do not count time used by the User.
if
(
this
.
showThisImages
)
showDiff
(
this
.
currentfX
,
"fit-"
+
this
.
iterationStepNumber
);
if
(
this
.
showThisImages
)
showDiff
(
this
.
currentfX
,
"fit-"
+
this
.
iterationStepNumber
);
if
(
this
.
showNextImages
)
showDiff
(
this
.
nextfX
,
"fit-"
+(
this
.
iterationStepNumber
+
1
));
if
(
this
.
showNextImages
)
showDiff
(
this
.
nextfX
,
"fit-"
+(
this
.
iterationStepNumber
+
1
));
}
else
if
(
(
this
.
debugLevel
>
0
)
&&
((
this
.
debugLevel
>
1
)
||
((
System
.
nanoTime
()-
this
.
startTime
)>
10000000000.0
))){
// > 10 sec
}
else
if
(
this
.
debugLevel
>
1
){
System
.
out
.
println
(
"
--> LevenbergMarquardt():
series:step ="
+
this
.
seriesNumber
+
":"
+
this
.
iterationStepNumber
+
System
.
out
.
println
(
"
==> LevenbergMarquardt(): before action
series:step ="
+
this
.
seriesNumber
+
":"
+
this
.
iterationStepNumber
+
", RMS="
+
IJ
.
d2s
(
this
.
currentRMS
,
8
)+
", RMS="
+
IJ
.
d2s
(
this
.
currentRMS
,
8
)+
" ("
+
IJ
.
d2s
(
this
.
firstRMS
,
8
)+
") "
+
" ("
+
IJ
.
d2s
(
this
.
firstRMS
,
8
)+
") "
+
", RMSPure="
+
IJ
.
d2s
(
this
.
currentRMSPure
,
8
)+
", RMSPure="
+
IJ
.
d2s
(
this
.
currentRMSPure
,
8
)+
...
@@ -7053,6 +7053,14 @@ List calibration
...
@@ -7053,6 +7053,14 @@ List calibration
" "
);
" "
);
// showStatus(this.seriesNumber+": "+"Step #"+this.iterationStepNumber+" RMS="+IJ.d2s(this.currentRMS,8)+ " ("+IJ.d2s(this.firstRMS,8)+")",0);
// showStatus(this.seriesNumber+": "+"Step #"+this.iterationStepNumber+" RMS="+IJ.d2s(this.currentRMS,8)+ " ("+IJ.d2s(this.firstRMS,8)+")",0);
}
}
if
((
this
.
debugLevel
>
0
)
&&
((
this
.
debugLevel
>
1
)
||
((
System
.
nanoTime
()-
this
.
startTime
)>
10000000000.0
))){
// > 10 sec
System
.
out
.
println
(
"--> LevenbergMarquardt(): series:step ="
+
this
.
seriesNumber
+
":"
+
this
.
iterationStepNumber
+
", RMS="
+
IJ
.
d2s
(
this
.
currentRMS
,
8
)+
" ("
+
IJ
.
d2s
(
this
.
firstRMS
,
8
)+
") "
+
", RMSPure="
+
IJ
.
d2s
(
this
.
currentRMSPure
,
8
)+
" ("
+
IJ
.
d2s
(
this
.
firstRMSPure
,
8
)+
") at "
+
IJ
.
d2s
(
0.000000001
*(
System
.
nanoTime
()-
this
.
startTime
),
3
));
}
if
(!
cont
){
if
(!
cont
){
if
(
this
.
saveSeries
)
{
if
(
this
.
saveSeries
)
{
saveFittingSeries
();
// will save series even if it ended in failure, vector will be only updated
saveFittingSeries
();
// will save series even if it ended in failure, vector will be only updated
...
...
src/main/java/LensDistortionParameters.java
View file @
9a96473e
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