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
8893c688
Commit
8893c688
authored
Apr 16, 2020
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using geometry correction for port offsets, found mitigation for an nvrtc problem
parent
4fb94627
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
53 deletions
+103
-53
GPUTileProcessor.java
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
+88
-40
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+1
-2
TileProcessor.cuh
src/main/resources/kernels/TileProcessor.cuh
+11
-9
TileProcessor.h
src/main/resources/kernels/TileProcessor.h
+3
-2
No files found.
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
View file @
8893c688
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
8893c688
...
...
@@ -2139,7 +2139,7 @@ public class TwoQuadCLT {
// run textures
long
startTextures
=
System
.
nanoTime
();
// System.nanoTime();
for
(
int
i
=
0
;
i
<
NREPEAT
;
i
++
)
gPUTileProcessor
.
execTextures
(
port_offsets
,
// double [][] port_offsets,
/** remove when done **/
port_offsets
,
// double [][] port_offsets,
col_weights
,
// double [] color_weights,
quadCLT_main
.
isLwir
(),
// boolean is_lwir,
clt_parameters
.
min_shot
,
// double min_shot, // 10.0
...
...
@@ -2154,7 +2154,6 @@ public class TwoQuadCLT {
// run texturesRBGA
long
startTexturesRBGA
=
System
.
nanoTime
();
// System.nanoTime();
for
(
int
i
=
0
;
i
<
NREPEAT
;
i
++
)
gPUTileProcessor
.
execRBGA
(
port_offsets
,
// double [][] port_offsets,
col_weights
,
// double [] color_weights,
quadCLT_main
.
isLwir
(),
// boolean is_lwir,
clt_parameters
.
min_shot
,
// double min_shot, // 10.0
...
...
src/main/resources/kernels/TileProcessor.cuh
View file @
8893c688
...
...
@@ -1182,7 +1182,9 @@ __global__ void generate_RBGA(
// Parameters for the texture generation
float
**
gpu_clt
,
// [NUM_CAMS] ->[TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE]
// TODO: use geometry_correction rXY !
float
*
gpu_port_offsets
,
// relative ports x,y offsets - just to scale differences, may be approximate
struct
gc
*
gpu_geometry_correction
,
// float * gpu_geometry_correction,
// float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate
int
colors
,
// number of colors (3/1)
int
is_lwir
,
// do not perform shot correction
float
min_shot
,
// 10.0
...
...
@@ -1190,9 +1192,7 @@ __global__ void generate_RBGA(
float
diff_sigma
,
// pixel value/pixel change
float
diff_threshold
,
// pixel value/pixel change
float
min_agree
,
// minimal number of channels to agree on a point (real number to work with fuzzy averages)
float
weight0
,
// scale for R
float
weight1
,
// scale for B
float
weight2
,
// scale for G
float
weights
[
3
],
// scale for R,B,G
int
dust_remove
,
// Do not reduce average weight when only one image differs much from the average
int
keep_weights
,
// return channel weights after A in RGBA (was removed)
const
size_t
texture_rbga_stride
,
// in floats
...
...
@@ -1200,6 +1200,7 @@ __global__ void generate_RBGA(
{
// TODO use atomic_add to increment num_texture_tiles
// TODO calculate woi
dim3
threads0
((
1
<<
THREADS_DYNAMIC_BITS
),
1
,
1
);
int
blocks_x
=
(
width
+
((
1
<<
THREADS_DYNAMIC_BITS
)
-
1
))
>>
THREADS_DYNAMIC_BITS
;
dim3
blocks0
(
blocks_x
,
height
,
1
);
...
...
@@ -1311,7 +1312,8 @@ __global__ void generate_RBGA(
gpu_clt
,
// float ** gpu_clt, // [NUM_CAMS] ->[TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE]
ntt
,
// size_t num_texture_tiles, // number of texture tiles to process
gpu_texture_indices
+
ti_offset
,
// int * gpu_texture_indices,// packed tile + bits (now only (1 << 7)
gpu_port_offsets
,
// float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate
// gpu_port_offsets, // float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate
(
float
*
)
gpu_geometry_correction
->
pXY0
,
colors
,
// int colors, // number of colors (3/1)
is_lwir
,
// int is_lwir, // do not perform shot correction
min_shot
,
// float min_shot, // 10.0
...
...
@@ -1319,9 +1321,9 @@ __global__ void generate_RBGA(
diff_sigma
,
// float diff_sigma, // pixel value/pixel change
diff_threshold
,
// float diff_threshold, // pixel value/pixel change
min_agree
,
// float min_agree, // minimal number of channels to agree on a point (real number to work with fuzzy averages)
weight
0
,
// float weight0, // scale for R
weight
1
,
// float weight1, // scale for B
weight
2
,
// float weight2, // scale for G
weight
s
[
0
],
// float weight0, // scale for R
weight
s
[
1
],
// float weight1, // scale for B
weight
s
[
2
],
// float weight2, // scale for G
dust_remove
,
// int dust_remove, // Do not reduce average weight when only one image differs much from the average
0
,
// int keep_weights, // return channel weights after A in RGBA (was removed) (should be 0 if gpu_texture_rbg)?
// combining both non-overlap and overlap (each calculated if pointer is not null )
...
...
src/main/resources/kernels/TileProcessor.h
View file @
8893c688
...
...
@@ -121,7 +121,7 @@ extern "C" __global__ void imclt_rbg(
int
woi_twidth
,
int
woi_theight
,
const
size_t
dstride
);
// in floats (pixels)
/*
extern "C" __global__ void generate_RBGA(
// Parameters to generate texture tasks
struct tp_task * gpu_tasks,
...
...
@@ -135,6 +135,7 @@ extern "C" __global__ void generate_RBGA(
// Parameters for the texture generation
float ** gpu_clt, // [NUM_CAMS] ->[TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE]
// TODO: use geometry_correction rXY !
struct gc * gpu_geometry_correction,
float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate
int colors, // number of colors (3/1)
int is_lwir, // do not perform shot correction
...
...
@@ -150,4 +151,4 @@ extern "C" __global__ void generate_RBGA(
int keep_weights, // return channel weights after A in RGBA (was removed)
const size_t texture_rbga_stride, // in floats
float * gpu_texture_tiles); // (number of colors +1 + ?)*16*16 rgba texture tiles
*/
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