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
7a838c63
Commit
7a838c63
authored
Dec 04, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing empty stacks in partial kernels command
parent
08bb8d2d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
49 deletions
+67
-49
Distortions.java
src/main/java/Distortions.java
+7
-0
EyesisAberrations.java
src/main/java/EyesisAberrations.java
+13
-2
EyesisCameraParameters.java
src/main/java/EyesisCameraParameters.java
+47
-47
No files found.
src/main/java/Distortions.java
View file @
7a838c63
...
@@ -6979,6 +6979,13 @@ List calibration
...
@@ -6979,6 +6979,13 @@ 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
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
));
}
}
stepLevenbergMarquardtAction
();
// apply step - in any case?
stepLevenbergMarquardtAction
();
// apply step - in any case?
if
(
this
.
updateStatus
){
if
(
this
.
updateStatus
){
...
...
src/main/java/EyesisAberrations.java
View file @
7a838c63
...
@@ -2157,6 +2157,10 @@ public class EyesisAberrations {
...
@@ -2157,6 +2157,10 @@ public class EyesisAberrations {
length
=
kernel
[
i
].
length
;
length
=
kernel
[
i
].
length
;
break
;
break
;
}
}
if
(
length
==
0
){
System
.
out
.
println
(
"mergeKernelsToStack(): no non-null kernels"
);
return
null
;
}
int
[]
channelsMask
=
new
int
[
kernel
.
length
];
int
[]
channelsMask
=
new
int
[
kernel
.
length
];
for
(
i
=
0
;
i
<
kernel
.
length
;
i
++)
channelsMask
[
i
]=
0
;
for
(
i
=
0
;
i
<
kernel
.
length
;
i
++)
channelsMask
[
i
]=
0
;
for
(
i
=
0
;
i
<
tilesY
;
i
++)
for
(
j
=
0
;
j
<
tilesX
;
j
++)
if
(
kernels
[
i
][
j
]!=
null
)
{
for
(
i
=
0
;
i
<
tilesY
;
i
++)
for
(
j
=
0
;
j
<
tilesX
;
j
++)
if
(
kernels
[
i
][
j
]!=
null
)
{
...
@@ -2178,6 +2182,7 @@ public class EyesisAberrations {
...
@@ -2178,6 +2182,7 @@ public class EyesisAberrations {
int
outHeight
=
size
*
tilesY
;
int
outHeight
=
size
*
tilesY
;
ImageStack
stack
=
new
ImageStack
(
outWidth
,
outHeight
);
ImageStack
stack
=
new
ImageStack
(
outWidth
,
outHeight
);
int
numKernels
=
0
;
float
[]
fpixels
;
float
[]
fpixels
;
for
(
chn
=
0
;
chn
<
nChn
;
chn
++)
{
for
(
chn
=
0
;
chn
<
nChn
;
chn
++)
{
fpixels
=
new
float
[
outWidth
*
outHeight
];
fpixels
=
new
float
[
outWidth
*
outHeight
];
...
@@ -2190,10 +2195,16 @@ public class EyesisAberrations {
...
@@ -2190,10 +2195,16 @@ public class EyesisAberrations {
fpixels
[
index
]=
(
float
)
kernels
[
i
][
j
][
k
][
y
*
size
+
x
];
fpixels
[
index
]=
(
float
)
kernels
[
i
][
j
][
k
][
y
*
size
+
x
];
}
}
}
}
if
((
kernels
[
i
][
j
]!=
null
&&
(
kernels
[
i
][
j
][
k
]!=
null
)))
numKernels
++;
}
}
if
(
names
==
null
)
stack
.
addSlice
(
"channel"
+
k
,
fpixels
);
if
(
names
==
null
)
stack
.
addSlice
(
"channel"
+
k
,
fpixels
);
else
stack
.
addSlice
(
names
[
chn
],
fpixels
);
else
stack
.
addSlice
(
names
[
chn
],
fpixels
);
}
}
if
(
numKernels
==
0
){
System
.
out
.
println
(
"mergeKernelsToStack(): all kernels are empty"
);
return
null
;
}
System
.
out
.
println
(
"mergeKernelsToStack(): got "
+
numKernels
+
" non-null kernels"
);
return
stack
;
return
stack
;
}
}
...
@@ -2687,6 +2698,7 @@ public class EyesisAberrations {
...
@@ -2687,6 +2698,7 @@ public class EyesisAberrations {
if
(!
colorComponents
.
colorsToCorrect
[
i
])
simul_pixels
[
i
]=
null
;
// removed unused
if
(!
colorComponents
.
colorsToCorrect
[
i
])
simul_pixels
[
i
]=
null
;
// removed unused
}
}
simul_pixels
=
normalizeAndWindow
(
simul_pixels
,
fullHamming
);
simul_pixels
=
normalizeAndWindow
(
simul_pixels
,
fullHamming
);
}
else
{
}
else
{
Rectangle
PSFCellSim
=
new
Rectangle
(
x0
*
subpixel
/
2
,
y0
*
subpixel
/
2
,
size
*
subpixel
/
2
,
size
*
subpixel
/
2
);
Rectangle
PSFCellSim
=
new
Rectangle
(
x0
*
subpixel
/
2
,
y0
*
subpixel
/
2
,
size
*
subpixel
/
2
,
size
*
subpixel
/
2
);
...
@@ -3256,8 +3268,7 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
...
@@ -3256,8 +3268,7 @@ if (globalDebugLevel>2)globalDebugLevel=0; //***********************************
// if ((globalDebugLevel>0) && (tileY==22) && (tileX==32) && (y>=0) && (x>=0) && (y<height) && (x<width))System.out.println(" uvIndex["+(y*width+x)+"]="+uvIndex[y*width+x]);
// if ((globalDebugLevel>0) && (tileY==22) && (tileX==32) && (y>=0) && (x>=0) && (y<height) && (x<width))System.out.println(" uvIndex["+(y*width+x)+"]="+uvIndex[y*width+x]);
}
}
result
[
tileY
][
tileX
]=(
sum
>
absThresh
);
result
[
tileY
][
tileX
]=(
sum
>
absThresh
);
if
(
debugLevel
>
1
)
System
.
out
.
println
(
" tileY="
+
tileY
+
" tileX="
+
tileX
+
" x0="
+
x0
+
" y0="
+
y0
+
" sum="
+
sum
);
if
(
debugLevel
>
1
)
System
.
out
.
println
(
" tileY="
+
tileY
+
" tileX="
+
tileX
+
" x0="
+
x0
+
" y0="
+
y0
+
" sum="
+
sum
+
" threshold="
+
threshold
+
" absThresh="
+
absThresh
+
" rrsult="
+
result
[
tileY
][
tileX
]);
}
}
return
result
;
return
result
;
}
}
...
...
src/main/java/EyesisCameraParameters.java
View file @
7a838c63
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