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
473bf75a
Commit
473bf75a
authored
Mar 12, 2020
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added RB correlation LPF
parent
3043615f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
3 deletions
+51
-3
GPUTileProcessor.java
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
+2
-1
Correlation2d.java
...n/java/com/elphel/imagej/tileprocessor/Correlation2d.java
+20
-1
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+22
-1
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+7
-0
No files found.
src/main/java/com/elphel/imagej/gpu/GPUTileProcessor.java
View file @
473bf75a
...
...
@@ -1044,11 +1044,12 @@ public class GPUTileProcessor {
}
public
void
setLpfCorr
(
String
const_name
,
// "lpf_corr"
float
[]
lpf_flat
)
{
CUdeviceptr
constantMemoryPointer
=
new
CUdeviceptr
();
long
constantMemorySizeArray
[]
=
{
0
};
cuModuleGetGlobal
(
constantMemoryPointer
,
constantMemorySizeArray
,
module
,
"lpf_corr"
);
cuModuleGetGlobal
(
constantMemoryPointer
,
constantMemorySizeArray
,
module
,
const_name
);
int
constantMemorySize
=
(
int
)
constantMemorySizeArray
[
0
];
System
.
out
.
println
(
"constantMemoryPointer: "
+
constantMemoryPointer
);
System
.
out
.
println
(
"constantMemorySize: "
+
constantMemorySize
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/Correlation2d.java
View file @
473bf75a
...
...
@@ -265,12 +265,31 @@ public class Correlation2d {
if
(
lpf
!=
null
)
{
if
(
debug_gpu
)
{
System
.
out
.
println
(
"=== LPF for CORRELATION ==="
);
/*
for (int i = 0; i < transform_size; i++) {
System.out.print("\t\t");
for (int j = 0; j < transform_size; j++) {
System
.
out
.
print
(
String
.
format
(
"%10.5f "
,
lpf
[
transform_size
*
i
+
j
]));
System.out.print(String.format("%10.8ff", lpf[transform_size * i + j]));
if ((j < (transform_size-1)) || (j < (transform_size-1))){
System.out.print(", ");
}
}
System.out.println();
}
*/
System
.
out
.
print
(
"__constant__ float lpf_corr[64]={"
);
for
(
int
i
=
0
;
i
<
lpf
.
length
;
i
++){
System
.
out
.
print
(
String
.
format
(
"%10.8ff"
,
lpf
[
i
]));
if
(
i
==
63
)
{
System
.
out
.
println
(
"};"
);
}
else
{
System
.
out
.
print
(
", "
);
if
((
i
%
8
)
==
7
)
{
System
.
out
.
print
(
"\n "
);
}
}
}
}
for
(
int
n
=
0
;
n
<
4
;
n
++)
{
for
(
int
i
=
0
;
i
<
transform_len
;
i
++)
{
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
473bf75a
...
...
@@ -9213,12 +9213,33 @@ public class ImageDtt {
}
if
(
debug_gpu
&&
debug_tile
)
{
System
.
out
.
println
(
"=== LPF-RB for CORRELATION ==="
);
/*
for (int i = 0; i < transform_size; i++) {
System.out.print("\t\t");
for (int j = 0; j < transform_size; j++) {
System
.
out
.
print
(
String
.
format
(
"%10.5f "
,
lpf_rb_fd
[
transform_size
*
i
+
j
]));
System.out.print(String.format("%10.8ff", lpf_rb_fd[transform_size * i + j]));
if ((j < (transform_size-1)) || (j < (transform_size-1))){
System.out.print(", ");
}
}
System.out.println();
}
*/
System
.
out
.
print
(
"__constant__ float lpf_rb_corr[64]={"
);
for
(
int
i
=
0
;
i
<
lpf_rb_fd
.
length
;
i
++){
System
.
out
.
print
(
String
.
format
(
"%10.8ff"
,
lpf_rb_fd
[
i
]));
if
(
i
==
63
)
{
System
.
out
.
println
(
"};"
);
}
else
{
System
.
out
.
print
(
", "
);
if
((
i
%
8
)
==
7
)
{
System
.
out
.
print
(
"\n "
);
}
}
}
System
.
out
.
println
(
"=== R+B LPF-ed CORRELATION ==="
);
for
(
int
dct_mode
=
0
;
dct_mode
<
4
;
dct_mode
++)
{
System
.
out
.
println
(
"------dct_mode="
+
dct_mode
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
473bf75a
...
...
@@ -1911,11 +1911,18 @@ public class TwoQuadCLT {
gPUTileProcessor
.
setLpfRbg
(
lpf_rgb
);
float
[]
lpf_flat
=
image_dtt
.
floatGetCltLpfFd
(
clt_parameters
.
getGpuCorrSigma
(
is_mono
));
gPUTileProcessor
.
setLpfCorr
(
"lpf_corr"
,
// String const_name, // "lpf_corr"
lpf_flat
);
float
[]
lpf_rb_flat
=
image_dtt
.
floatGetCltLpfFd
(
clt_parameters
.
getGpuCorrRBSigma
(
is_mono
));
gPUTileProcessor
.
setLpfCorr
(
"lpf_rb_corr"
,
// String const_name, // "lpf_corr"
lpf_rb_flat
);
final
boolean
use_aux
=
false
;
// currently GPU is configured for a single quad camera
...
...
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