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
7ccf095c
Commit
7ccf095c
authored
Nov 17, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on textures to look behind on BG using only subset of cameras
parent
f6006466
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1244 additions
and
10 deletions
+1244
-10
GpuQuad.java
src/main/java/com/elphel/imagej/gpu/GpuQuad.java
+9
-5
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+6
-4
QuadCLT.java
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
+345
-0
TexturedModel.java
...n/java/com/elphel/imagej/tileprocessor/TexturedModel.java
+884
-1
No files found.
src/main/java/com/elphel/imagej/gpu/GpuQuad.java
View file @
7ccf095c
...
@@ -2290,10 +2290,10 @@ public class GpuQuad{ // quad camera description
...
@@ -2290,10 +2290,10 @@ public class GpuQuad{ // quad camera description
int
[]
cpu_num_texture_tiles
=
new
int
[
8
];
int
[]
cpu_num_texture_tiles
=
new
int
[
8
];
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); // hope that Float.floatToIntBits(fcorr_indices[i]) is not needed
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); // hope that Float.floatToIntBits(fcorr_indices[i]) is not needed
cpu_woi
[
0
]
=
width
;
cpu_woi
[
0
]
=
width
;
// larger than any x
cpu_woi
[
1
]
=
height
;
cpu_woi
[
1
]
=
height
;
// larger than any y
cpu_woi
[
2
]
=
0
;
cpu_woi
[
2
]
=
0
;
// smaller or equal than any x
cpu_woi
[
3
]
=
0
;
cpu_woi
[
3
]
=
0
;
// smaller or equal than any y
cuMemcpyHtoD
(
gpu_woi
,
Pointer
.
to
(
cpu_woi
),
cpu_woi
.
length
*
Sizeof
.
INT
);
cuMemcpyHtoD
(
gpu_woi
,
Pointer
.
to
(
cpu_woi
),
cpu_woi
.
length
*
Sizeof
.
INT
);
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); //just for testing
// cuMemcpyDtoH(Pointer.to(cpu_woi), gpu_woi, cpu_woi.length * Sizeof.INT); //just for testing
...
@@ -2395,6 +2395,9 @@ public class GpuQuad{ // quad camera description
...
@@ -2395,6 +2395,9 @@ public class GpuQuad{ // quad camera description
int
texture_width
=
(
cpu_woi
[
2
]
+
1
)
*
GPUTileProcessor
.
DTT_SIZE
;
int
texture_width
=
(
cpu_woi
[
2
]
+
1
)
*
GPUTileProcessor
.
DTT_SIZE
;
int
texture_tiles_height
=
(
cpu_woi
[
3
]
+
1
)
*
GPUTileProcessor
.
DTT_SIZE
;
int
texture_tiles_height
=
(
cpu_woi
[
3
]
+
1
)
*
GPUTileProcessor
.
DTT_SIZE
;
int
texture_slices
=
num_colors
+
1
;
int
texture_slices
=
num_colors
+
1
;
if
((
keep_weights
&
2
)
!=
0
)
{
texture_slices
+=
num_colors
*
num_cams
;
}
int
blocks_x2
=
((
texture_width
+
int
blocks_x2
=
((
texture_width
+
((
1
<<
(
GPUTileProcessor
.
THREADS_DYNAMIC_BITS
+
GPUTileProcessor
.
DTT_SIZE_LOG2
))
-
1
))
>>
((
1
<<
(
GPUTileProcessor
.
THREADS_DYNAMIC_BITS
+
GPUTileProcessor
.
DTT_SIZE_LOG2
))
-
1
))
>>
...
@@ -3382,6 +3385,7 @@ public class GpuQuad{ // quad camera description
...
@@ -3382,6 +3385,7 @@ public class GpuQuad{ // quad camera description
return
textures
;
return
textures
;
}
}
/*
public static double [][][][] doubleTextures( // not used
public static double [][][][] doubleTextures( // not used
Rectangle woi,
Rectangle woi,
int [] indices,
int [] indices,
...
@@ -3407,7 +3411,7 @@ public class GpuQuad{ // quad camera description
...
@@ -3407,7 +3411,7 @@ public class GpuQuad{ // quad camera description
}
}
return textures;
return textures;
}
}
*/
public
static
double
[][][][]
doubleTextures
(
// may be accelerated with multithreading if needed.
public
static
double
[][][][]
doubleTextures
(
// may be accelerated with multithreading if needed.
Rectangle
woi
,
// null or width and height match texture_tiles
Rectangle
woi
,
// null or width and height match texture_tiles
double
[][][][]
texture_tiles
,
// null or [tilesY][tilesX]
double
[][][][]
texture_tiles
,
// null or [tilesY][tilesX]
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
7ccf095c
...
@@ -692,12 +692,14 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -692,12 +692,14 @@ public class ImageDtt extends ImageDttCPU {
true
,
// boolean calc_textures,
true
,
// boolean calc_textures,
false
,
// boolean calc_extra
false
,
// boolean calc_extra
false
);
// boolean linescan_order)
false
);
// boolean linescan_order)
int
num_src_slices
=
numcol
+
1
;
// + (clt_parameters.keep_weights?(ports + numcol + 1):0); // 12 ; // calculate
// int num_src_slices = numcol + 1; // + (clt_parameters.keep_weights?(ports + numcol + 1):0); // 12 ; // calculate
int
num_src_slices
=
numcol
+
1
+
((
keep_weights
!=
0
)?(
getNumSensors
()
+
numcol
+
1
):
0
);
int
num_out_slices
=
numcol
+
1
+
((
keep_weights
!=
0
)?(
getNumSensors
()):
0
);
// 18
int
[]
texture_indices
=
gpuQuad
.
getTextureIndices
();
int
[]
texture_indices
=
gpuQuad
.
getTextureIndices
();
float
[]
flat_textures
=
gpuQuad
.
getFlatTextures
(
float
[]
flat_textures
=
gpuQuad
.
getFlatTextures
(
texture_indices
.
length
,
texture_indices
.
length
,
numcol
,
// int num_colors,
numcol
,
// int num_colors,
false
);
// clt_parameters.keep_weights); // boolean keep_weights);
(
keep_weights
!=
0
)
);
// clt_parameters.keep_weights); // boolean keep_weights);
int
tilesX
=
gpuQuad
.
img_width
/
GPUTileProcessor
.
DTT_SIZE
;
int
tilesX
=
gpuQuad
.
img_width
/
GPUTileProcessor
.
DTT_SIZE
;
int
tilesY
=
gpuQuad
.
img_height
/
GPUTileProcessor
.
DTT_SIZE
;
int
tilesY
=
gpuQuad
.
img_height
/
GPUTileProcessor
.
DTT_SIZE
;
double
[][][][]
texture_tiles
=
new
double
[
tilesY
][
tilesX
][][];
double
[][][][]
texture_tiles
=
new
double
[
tilesY
][
tilesX
][][];
...
@@ -707,7 +709,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -707,7 +709,7 @@ public class ImageDtt extends ImageDttCPU {
texture_indices
,
// int [] indices,
texture_indices
,
// int [] indices,
flat_textures
,
// float [][][] ftextures,
flat_textures
,
// float [][][] ftextures,
tilesX
,
// int full_width,
tilesX
,
// int full_width,
isMonochrome
()?
2
:
4
,
// rbga only /int num_slices Same number
num_out_slices
,
//
isMonochrome()? 2: 4, // rbga only /int num_slices Same number
num_src_slices
// int num_src_slices
num_src_slices
// int num_src_slices
);
);
return
texture_tiles
;
return
texture_tiles
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
View file @
7ccf095c
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/TexturedModel.java
View file @
7ccf095c
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