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
1338de2c
Commit
1338de2c
authored
Oct 09, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added variable LPF through GPU constants memory
parent
72b6bdce
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
302 deletions
+101
-302
GPUTileProcessor.java
src/main/java/GPUTileProcessor.java
+85
-280
TwoQuadCLT.java
src/main/java/TwoQuadCLT.java
+16
-22
No files found.
src/main/java/GPUTileProcessor.java
View file @
1338de2c
This diff is collapsed.
Click to expand it.
src/main/java/TwoQuadCLT.java
View file @
1338de2c
...
@@ -1355,27 +1355,7 @@ public class TwoQuadCLT {
...
@@ -1355,27 +1355,7 @@ public class TwoQuadCLT {
dst_bayer
[
nc
][
i
]=
nc
*
main_bayer
[
nc
].
length
+
i
;
dst_bayer
[
nc
][
i
]=
nc
*
main_bayer
[
nc
].
length
+
i
;
}
}
}
}
/*
int iwidth = imp_quad_main[0].getWidth();
String [] dbg_titles= {"src0","dst0","src1","dst1","src2","dst2","src3","dst3"};
for (int nc = 0; nc < main_bayer.length; nc++) {
gPUTileProcessor.exec_dtt24(
main_bayer[nc], // float src_pixels[],
dst_bayer[nc], // float dst_pixels[],
iwidth, // int width,
0); // int dtt_mode);
}
float [][] both_bayer = {main_bayer[0],dst_bayer[0],main_bayer[1],dst_bayer[1],main_bayer[2],dst_bayer[2],main_bayer[3],dst_bayer[3]};
(new showDoubleFloatArrays()).showArrays(
both_bayer,
iwidth,
main_bayer[0].length / iwidth,
true,
"converted",
dbg_titles);
*/
double
[][][]
port_xy_main_dbg
=
new
double
[
tilesX
*
tilesY
][][];
double
[][][]
port_xy_main_dbg
=
new
double
[
tilesX
*
tilesY
][][];
double
[][][]
port_xy_aux_dbg
=
new
double
[
tilesX
*
tilesY
][][];
double
[][][]
port_xy_aux_dbg
=
new
double
[
tilesX
*
tilesY
][][];
...
@@ -1832,6 +1812,12 @@ public class TwoQuadCLT {
...
@@ -1832,6 +1812,12 @@ public class TwoQuadCLT {
final
boolean
updateStatus
,
final
boolean
updateStatus
,
final
int
debugLevel
){
final
int
debugLevel
){
gPUTileProcessor
.
setLpfRbg
(
1.1f
,
// float sigma_r,
1.1f
,
// float sigma_b,
0.7f
);
// float sigma_g)
final
boolean
use_aux
=
false
;
// currently GPU is configured for a single quad camera
final
boolean
use_aux
=
false
;
// currently GPU is configured for a single quad camera
final
boolean
batch_mode
=
clt_parameters
.
batch_run
;
//disable any debug images
final
boolean
batch_mode
=
clt_parameters
.
batch_run
;
//disable any debug images
...
@@ -1889,9 +1875,17 @@ public class TwoQuadCLT {
...
@@ -1889,9 +1875,17 @@ public class TwoQuadCLT {
use_aux
);
// boolean use_aux)
use_aux
);
// boolean use_aux)
// All set, run kernel (correct and convert)
// All set, run kernel (correct and convert)
gPUTileProcessor
.
execConverCorrectTiles
();
int
NREPEAT
=
1
;
// 00;
System
.
out
.
println
(
"\n------------ Running GPU "
+
NREPEAT
+
" times ----------------"
);
long
startGPU
=
System
.
nanoTime
();
for
(
int
i
=
0
;
i
<
NREPEAT
;
i
++
)
gPUTileProcessor
.
execConverCorrectTiles
();
// run imclt;
// run imclt;
gPUTileProcessor
.
execImcltRbg
();
long
firstGPUTime
=
(
System
.
nanoTime
()
-
startGPU
)/
NREPEAT
;
for
(
int
i
=
0
;
i
<
NREPEAT
;
i
++
)
gPUTileProcessor
.
execImcltRbg
();
long
runGPUTime
=
(
System
.
nanoTime
()
-
startGPU
)/
NREPEAT
;
System
.
out
.
println
(
"\n------------ End of running GPU "
+
NREPEAT
+
" times ----------------"
);
System
.
out
.
println
(
"GPU run time ="
+(
runGPUTime
*
1.0
e
-
6
)+
"ms, (direct conversion: "
+(
firstGPUTime
*
1.0
e
-
6
)+
"ms, imclt: "
+
((
runGPUTime
-
firstGPUTime
)*
1.0
e
-
6
)+
"ms)"
);
float
[][][]
iclt_fimg
=
new
float
[
GPUTileProcessor
.
NUM_CAMS
][][];
float
[][][]
iclt_fimg
=
new
float
[
GPUTileProcessor
.
NUM_CAMS
][][];
for
(
int
ncam
=
0
;
ncam
<
iclt_fimg
.
length
;
ncam
++)
{
for
(
int
ncam
=
0
;
ncam
<
iclt_fimg
.
length
;
ncam
++)
{
...
...
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