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
fba24b20
Commit
fba24b20
authored
Apr 18, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewriting correlation processing to handle diagonal and multi-baseline
pairs
parent
421e0704
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1325 additions
and
40 deletions
+1325
-40
Correlation2d.java
src/main/java/Correlation2d.java
+986
-0
DttRad2.java
src/main/java/DttRad2.java
+61
-0
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+3
-3
ImageDtt.java
src/main/java/ImageDtt.java
+137
-8
ImageDttParameters.java
src/main/java/ImageDttParameters.java
+138
-29
No files found.
src/main/java/Correlation2d.java
0 → 100644
View file @
fba24b20
This diff is collapsed.
Click to expand it.
src/main/java/DttRad2.java
View file @
fba24b20
...
@@ -432,6 +432,66 @@ public class DttRad2 {
...
@@ -432,6 +432,66 @@ public class DttRad2 {
}
}
}
}
/**
* Unfolds 2d correlation tile in pixel domain
* @param qdata 4-quadrant result of 2cd DCT2
* @param transform_size DCT transformation size
* @return packed array [(2*transform_size-1) * (2*transform_size-1)]
*/
public
double
[]
corr_unfold_tile
(
double
[][]
qdata
,
// [4][transform_size*transform_size] data after DCT2 (pixel domain)
int
transform_size
)
{
int
corr_pixsize
=
transform_size
*
2
-
1
;
double
corr_pixscale
=
0.25
;
double
[]
rslt
=
new
double
[
corr_pixsize
*
corr_pixsize
];
rslt
[
corr_pixsize
*
transform_size
-
transform_size
]
=
corr_pixscale
*
qdata
[
0
][
0
];
// center
for
(
int
j
=
1
;
j
<
transform_size
;
j
++)
{
// for i == 0
rslt
[
corr_pixsize
*
transform_size
-
transform_size
+
j
]
=
corr_pixscale
*
(
qdata
[
0
][
j
]
+
qdata
[
1
][
j
-
1
]);
rslt
[
corr_pixsize
*
transform_size
-
transform_size
-
j
]
=
corr_pixscale
*
(
qdata
[
0
][
j
]
-
qdata
[
1
][
j
-
1
]);
}
for
(
int
i
=
1
;
i
<
transform_size
;
i
++)
{
rslt
[
corr_pixsize
*(
transform_size
+
i
)
-
transform_size
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
]
+
qdata
[
2
][(
i
-
1
)*
transform_size
]);
rslt
[
corr_pixsize
*(
transform_size
-
i
)
-
transform_size
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
]
-
qdata
[
2
][(
i
-
1
)*
transform_size
]);
for
(
int
j
=
1
;
j
<
transform_size
;
j
++)
{
rslt
[
corr_pixsize
*(
transform_size
+
i
)
-
transform_size
+
j
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
+
j
]
+
qdata
[
1
][
i
*
transform_size
+
j
-
1
]
+
qdata
[
2
][(
i
-
1
)*
transform_size
+
j
]
+
qdata
[
3
][(
i
-
1
)*
transform_size
+
j
-
1
]);
rslt
[
corr_pixsize
*(
transform_size
+
i
)
-
transform_size
-
j
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
+
j
]
+
-
qdata
[
1
][
i
*
transform_size
+
j
-
1
]
+
qdata
[
2
][(
i
-
1
)*
transform_size
+
j
]
+
-
qdata
[
3
][(
i
-
1
)*
transform_size
+
j
-
1
]);
rslt
[
corr_pixsize
*(
transform_size
-
i
)
-
transform_size
+
j
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
+
j
]
+
qdata
[
1
][
i
*
transform_size
+
j
-
1
]
+
-
qdata
[
2
][(
i
-
1
)*
transform_size
+
j
]
+
-
qdata
[
3
][(
i
-
1
)*
transform_size
+
j
-
1
]);
rslt
[
corr_pixsize
*(
transform_size
-
i
)
-
transform_size
-
j
]
=
corr_pixscale
*
(
qdata
[
0
][
i
*
transform_size
+
j
]
+
-
qdata
[
1
][
i
*
transform_size
+
j
-
1
]
+
-
qdata
[
2
][(
i
-
1
)*
transform_size
+
j
]
+
qdata
[
3
][(
i
-
1
)*
transform_size
+
j
-
1
]);
}
}
return
rslt
;
}
public
double
[]
dttt_iv
(
double
[]
x
){
public
double
[]
dttt_iv
(
double
[]
x
){
return
dttt_iv
(
x
,
0
,
1
<<
(
ilog2
(
x
.
length
)/
2
));
return
dttt_iv
(
x
,
0
,
1
<<
(
ilog2
(
x
.
length
)/
2
));
}
}
...
@@ -1085,4 +1145,5 @@ public class DttRad2 {
...
@@ -1085,4 +1145,5 @@ public class DttRad2 {
}
}
}
}
src/main/java/EyesisCorrectionParameters.java
View file @
fba24b20
...
@@ -2350,13 +2350,13 @@ public class EyesisCorrectionParameters {
...
@@ -2350,13 +2350,13 @@ public class EyesisCorrectionParameters {
public
double
corr_red
=
0.5
;
// Red to green correlation weight
public
double
corr_red
=
0.5
;
// Red to green correlation weight
public
double
corr_blue
=
0.2
;
// Blue to green correlation weight
public
double
corr_blue
=
0.2
;
// Blue to green correlation weight
public
boolean
corr_normalize
=
false
;
// normalize each correlation tile by rms
public
boolean
corr_normalize
=
false
;
// normalize each correlation tile by rms
public
double
min_corr
=
0.0
01
;
// minimal correlation value to consider valid
public
double
min_corr
=
0.0
2
;
// minimal correlation value to consider valid
public
double
min_corr_normalized
=
2.0
;
// minimal correlation value to consider valid when normalizing correlation results
public
double
min_corr_normalized
=
2.0
;
// minimal correlation value to consider valid when normalizing correlation results
public
double
max_corr_sigma
=
1.
5
;
// weights of points around global max to find fractional
public
double
max_corr_sigma
=
1.
2
;
// weights of points around global max to find fractional
// pixel location by quadratic approximation
// pixel location by quadratic approximation
public
double
corr_r2_offset
=
0.0
;
// 0.0 - for compatibility with old, normally should be 2.0 (or 1.0)
public
double
corr_r2_offset
=
0.0
;
// 0.0 - for compatibility with old, normally should be 2.0 (or 1.0)
public
double
max_corr_radius
=
3.
5
;
// maximal distance from int max to consider
public
double
max_corr_radius
=
3.
9
;
// maximal distance from int max to consider
// public int enhortho_width = 2; // reduce weight of center correlation pixels from center (0 - none, 1 - center, 2 +/-1 from center)
// public int enhortho_width = 2; // reduce weight of center correlation pixels from center (0 - none, 1 - center, 2 +/-1 from center)
// public double enhortho_scale = 0.0; // 0.2; // multiply center correlation pixels (inside enhortho_width)
// public double enhortho_scale = 0.0; // 0.2; // multiply center correlation pixels (inside enhortho_width)
...
...
src/main/java/ImageDtt.java
View file @
fba24b20
This diff is collapsed.
Click to expand it.
src/main/java/ImageDttParameters.java
View file @
fba24b20
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