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
624db0c0
Commit
624db0c0
authored
Sep 07, 2021
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating ExtrinsicAdjustment for variable number of sensors
parent
31555875
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1136 additions
and
188 deletions
+1136
-188
ExtrinsicAdjustment.java
.../com/elphel/imagej/tileprocessor/ExtrinsicAdjustment.java
+244
-136
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+14
-14
ImageDttCPU.java
...ain/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
+853
-26
QuadCLT.java
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
+9
-2
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+16
-10
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ExtrinsicAdjustment.java
View file @
624db0c0
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
624db0c0
...
@@ -3334,7 +3334,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3334,7 +3334,7 @@ public class ImageDtt extends ImageDttCPU {
dbg_img
[
18
][
nclust
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
dbg_img
[
18
][
nclust
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
}
}
if
((
lma_ds
[
0
]
!=
null
)
&&
(
lma_ds
[
0
][
1
]>
0.0
))
{
if
((
lma_ds
[
0
]
!=
null
)
&&
(
lma_ds
[
0
][
1
]>
0.0
))
{
lazy_eye_data
[
nclust
]
=
new
double
[
ExtrinsicAdjustment
.
INDX_LENGTH
];
lazy_eye_data
[
nclust
]
=
new
double
[
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
numSensors
)
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
=
strengh_k
*
lma_ds
[
0
][
1
]
*
num_in_cluster
[
clustY
][
clustX
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
=
strengh_k
*
lma_ds
[
0
][
1
]
*
num_in_cluster
[
clustY
][
clustX
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_DISP
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_DISP
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_TARGET
]
=
(
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
);
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_TARGET
]
=
(
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
);
...
@@ -3342,21 +3342,21 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3342,21 +3342,21 @@ public class ImageDtt extends ImageDttCPU {
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
0
]
=
pxpy
[
clustY
][
clustX
][
0
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
0
]
=
pxpy
[
clustY
][
clustX
][
0
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
1
]
=
pxpy
[
clustY
][
clustX
][
1
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
1
]
=
pxpy
[
clustY
][
clustX
][
1
];
for
(
int
cam
=
0
;
cam
<
quad
;
cam
++)
{
for
(
int
cam
=
0
;
cam
<
quad
;
cam
++)
{
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_DYDDISP0
+
cam
]
=
tile_disp_dist
[
cam
][
2
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DYDDISP0
(
numSensors
)
+
cam
]
=
tile_disp_dist
[
cam
][
2
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_PYDIST
+
cam
]
=
clust_pY
[
clustY
][
clustX
][
cam
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_PYDIST
(
numSensors
)
+
cam
]
=
clust_pY
[
clustY
][
clustX
][
cam
];
}
}
for
(
int
cam
=
0
;
cam
<
ddnd
.
length
;
cam
++)
{
for
(
int
cam
=
0
;
cam
<
ddnd
.
length
;
cam
++)
{
if
(
ddnd
[
cam
]
!=
null
)
{
//convert to x,y from dd/nd
if
(
ddnd
[
cam
]
!=
null
)
{
//convert to x,y from dd/nd
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
0
]
-
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
1
];
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
0
]
-
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
1
];
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
1
]
+
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
0
];
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
1
]
+
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
0
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_DD0
+
cam
]
=
ddnd
[
cam
][
0
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DD0
(
numSensors
)
+
cam
]
=
ddnd
[
cam
][
0
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_ND0
+
cam
]
=
ddnd
[
cam
][
1
];
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_ND0
(
numSensors
)
+
cam
]
=
ddnd
[
cam
][
1
];
}
else
{
}
else
{
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_DD0
+
cam
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DD0
(
numSensors
)
+
cam
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
INDX_ND0
+
cam
]
=
Double
.
NaN
;
lazy_eye_data
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_ND0
(
numSensors
)
+
cam
]
=
Double
.
NaN
;
}
}
}
}
}
}
...
@@ -3652,7 +3652,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3652,7 +3652,7 @@ public class ImageDtt extends ImageDttCPU {
}
}
if
((
lma_ds
[
0
]
!=
null
)
&&
(
lma_ds
[
0
][
1
]>
0.0
))
{
if
((
lma_ds
[
0
]
!=
null
)
&&
(
lma_ds
[
0
][
1
]>
0.0
))
{
lazy_eye_data_final
[
nclust
]
=
new
double
[
ExtrinsicAdjustment
.
INDX_LENGTH
];
lazy_eye_data_final
[
nclust
]
=
new
double
[
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
numSensors
)
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
=
strengh_k
*
lma_ds
[
0
][
1
]
*
num_in_cluster_final
[
clustY
][
clustX
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
=
strengh_k
*
lma_ds
[
0
][
1
]
*
num_in_cluster_final
[
clustY
][
clustX
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_DISP
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_DISP
]
=
lma_ds
[
0
][
0
]
+
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_TARGET
]
=
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_TARGET
]
=
disparity_array_center
[
clustY
][
clustX
]
+
disparity_corr
;
...
@@ -3660,20 +3660,20 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3660,20 +3660,20 @@ public class ImageDtt extends ImageDttCPU {
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
0
]
=
pxpy_super
[
clustY
][
clustX
][
0
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
0
]
=
pxpy_super
[
clustY
][
clustX
][
0
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
1
]
=
pxpy_super
[
clustY
][
clustX
][
1
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_PX
+
1
]
=
pxpy_super
[
clustY
][
clustX
][
1
];
for
(
int
cam
=
0
;
cam
<
quad
;
cam
++)
{
for
(
int
cam
=
0
;
cam
<
quad
;
cam
++)
{
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_DYDDISP0
+
cam
]
=
tile_disp_dist
[
cam
][
2
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DYDDISP0
(
numSensors
)
+
cam
]
=
tile_disp_dist
[
cam
][
2
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_PYDIST
+
cam
]
=
clust_pY_super
[
clustY
][
clustX
][
cam
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_PYDIST
(
numSensors
)
+
cam
]
=
clust_pY_super
[
clustY
][
clustX
][
cam
];
}
}
for
(
int
cam
=
0
;
cam
<
ddnd
.
length
;
cam
++)
{
for
(
int
cam
=
0
;
cam
<
ddnd
.
length
;
cam
++)
{
if
(
ddnd
[
cam
]
!=
null
)
{
//convert to x,y from dd/nd
if
(
ddnd
[
cam
]
!=
null
)
{
//convert to x,y from dd/nd
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
0
]
-
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
1
];
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
0
]
-
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
1
];
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
1
]
+
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
0
];
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
ddnd
[
cam
][
0
]
*
rXY
[
cam
][
1
]
+
ddnd
[
cam
][
1
]
*
rXY
[
cam
][
0
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_DD0
+
cam
]
=
ddnd
[
cam
][
0
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DD0
(
numSensors
)
+
cam
]
=
ddnd
[
cam
][
0
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_ND0
+
cam
]
=
ddnd
[
cam
][
1
];
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_ND0
(
numSensors
)
+
cam
]
=
ddnd
[
cam
][
1
];
}
else
{
}
else
{
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
0
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
2
*
cam
+
ExtrinsicAdjustment
.
INDX_X0
+
1
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_DD0
+
cam
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_DD0
(
numSensors
)
+
cam
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
INDX_ND0
+
cam
]
=
Double
.
NaN
;
lazy_eye_data_final
[
nclust
][
ExtrinsicAdjustment
.
get_INDX_ND0
(
numSensors
)
+
cam
]
=
Double
.
NaN
;
}
}
}
}
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
View file @
624db0c0
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
View file @
624db0c0
...
@@ -5078,7 +5078,14 @@ if (debugLevel < -100) {
...
@@ -5078,7 +5078,14 @@ if (debugLevel < -100) {
clt_parameters
.
tileY
,
// final int debug_tileY,
clt_parameters
.
tileY
,
// final int debug_tileY,
threadsMax
,
threadsMax
,
debugLevel
);
debugLevel
);
double
[][]
dbg_img
=
new
double
[
ExtrinsicAdjustment
.
DATA_TITLES
.
length
][
lazy_eye_data_dbg
.
length
];
ExtrinsicAdjustment
ea_dbg
=
new
ExtrinsicAdjustment
(
geometryCorrection
,
// GeometryCorrection gc,
1
,
// int clusterSize,
tilesX
,
// int clustersX,
tilesY
);
// int clustersY)
// double [][] dbg_img = new double[ExtrinsicAdjustment.DATA_TITLES.length][lazy_eye_data_dbg.length];
double
[][]
dbg_img
=
new
double
[
ea_dbg
.
data_titles
.
length
][
lazy_eye_data_dbg
.
length
];
for
(
int
i
=
0
;
i
<
dbg_img
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
dbg_img
.
length
;
i
++)
{
Arrays
.
fill
(
dbg_img
[
i
],
Double
.
NaN
);
Arrays
.
fill
(
dbg_img
[
i
],
Double
.
NaN
);
}
}
...
@@ -5094,7 +5101,7 @@ if (debugLevel < -100) {
...
@@ -5094,7 +5101,7 @@ if (debugLevel < -100) {
tp
.
getTilesY
(),
tp
.
getTilesY
(),
true
,
true
,
"LY-everytile"
,
"LY-everytile"
,
ExtrinsicAdjustment
.
DATA_TITLES
);
ea_dbg
.
data_titles
);
//
ExtrinsicAdjustment.DATA_TITLES);
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
624db0c0
...
@@ -5945,7 +5945,7 @@ public class QuadCLTCPU {
...
@@ -5945,7 +5945,7 @@ public class QuadCLTCPU {
double
[][]
dsxy
=
new
double
[
clustersX
*
clustersY
][];
double
[][]
dsxy
=
new
double
[
clustersX
*
clustersY
][];
ImagePlus
imp_sel
=
WindowManager
.
getCurrentImage
();
ImagePlus
imp_sel
=
WindowManager
.
getCurrentImage
();
if
((
imp_sel
==
null
)
||
(
imp_sel
.
getStackSize
()
!=
ExtrinsicAdjustment
.
INDX_LENGTH
))
{
if
((
imp_sel
==
null
)
||
(
imp_sel
.
getStackSize
()
!=
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())
))
{
System
.
out
.
println
(
"No image / wrong image selected, bailing out"
);
System
.
out
.
println
(
"No image / wrong image selected, bailing out"
);
return
null
;
return
null
;
}
else
{
}
else
{
...
@@ -5958,7 +5958,7 @@ public class QuadCLTCPU {
...
@@ -5958,7 +5958,7 @@ public class QuadCLTCPU {
return
null
;
return
null
;
}
}
ImageStack
stack_sel
=
imp_sel
.
getStack
();
ImageStack
stack_sel
=
imp_sel
.
getStack
();
float
[][]
fpixels
=
new
float
[
ExtrinsicAdjustment
.
INDX_LENGTH
][];
float
[][]
fpixels
=
new
float
[
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())
][];
for
(
int
i
=
0
;
i
<
fpixels
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
fpixels
.
length
;
i
++)
{
fpixels
[
i
]
=
(
float
[])
stack_sel
.
getPixels
(
i
+
1
);
fpixels
[
i
]
=
(
float
[])
stack_sel
.
getPixels
(
i
+
1
);
}
}
...
@@ -6247,10 +6247,16 @@ public class QuadCLTCPU {
...
@@ -6247,10 +6247,16 @@ public class QuadCLTCPU {
if
(
lazy_eye_data
!=
null
)
{
if
(
lazy_eye_data
!=
null
)
{
int
clustersX
=
(
tilesX
+
clt_parameters
.
tileStep
-
1
)
/
clt_parameters
.
tileStep
;
int
clustersX
=
(
tilesX
+
clt_parameters
.
tileStep
-
1
)
/
clt_parameters
.
tileStep
;
int
clustersY
=
(
tilesY
+
clt_parameters
.
tileStep
-
1
)
/
clt_parameters
.
tileStep
;
int
clustersY
=
(
tilesY
+
clt_parameters
.
tileStep
-
1
)
/
clt_parameters
.
tileStep
;
double
[][]
dbg_cluster
=
new
double
[
ExtrinsicAdjustment
.
INDX_LENGTH
][
clustersY
*
clustersX
];
ExtrinsicAdjustment
ea_dbg
=
new
ExtrinsicAdjustment
(
geometryCorrection
,
// GeometryCorrection gc,
clt_parameters
.
tileStep
,
// int clusterSize,
clustersX
,
// int clustersX,
clustersY
);
// int clustersY)
double
[][]
dbg_cluster
=
new
double
[
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())][
clustersY
*
clustersX
];
for
(
int
n
=
0
;
n
<
lazy_eye_data
.
length
;
n
++)
{
for
(
int
n
=
0
;
n
<
lazy_eye_data
.
length
;
n
++)
{
if
((
lazy_eye_data
[
n
]
!=
null
)
&&
(
lazy_eye_data
[
n
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
>=
clt_parameters
.
img_dtt
.
lma_diff_minw
))
{
if
((
lazy_eye_data
[
n
]
!=
null
)
&&
(
lazy_eye_data
[
n
][
ExtrinsicAdjustment
.
INDX_STRENGTH
]
>=
clt_parameters
.
img_dtt
.
lma_diff_minw
))
{
for
(
int
i
=
0
;
i
<
ExtrinsicAdjustment
.
INDX_LENGTH
;
i
++
)
{
for
(
int
i
=
0
;
i
<
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())
;
i
++
)
{
if
(
i
==
ExtrinsicAdjustment
.
INDX_STRENGTH
)
{
if
(
i
==
ExtrinsicAdjustment
.
INDX_STRENGTH
)
{
dbg_cluster
[
i
][
n
]
=
lazy_eye_data
[
n
][
i
]
-
clt_parameters
.
img_dtt
.
lma_diff_minw
;
// strength
dbg_cluster
[
i
][
n
]
=
lazy_eye_data
[
n
][
i
]
-
clt_parameters
.
img_dtt
.
lma_diff_minw
;
// strength
}
else
{
}
else
{
...
@@ -6258,7 +6264,7 @@ public class QuadCLTCPU {
...
@@ -6258,7 +6264,7 @@ public class QuadCLTCPU {
}
}
}
}
}
else
{
}
else
{
for
(
int
i
=
0
;
i
<
ExtrinsicAdjustment
.
INDX_LENGTH
;
i
++
)
{
for
(
int
i
=
0
;
i
<
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())
;
i
++
)
{
if
(
i
==
ExtrinsicAdjustment
.
INDX_STRENGTH
)
{
if
(
i
==
ExtrinsicAdjustment
.
INDX_STRENGTH
)
{
dbg_cluster
[
i
][
n
]
=
0.0
;
// strength
dbg_cluster
[
i
][
n
]
=
0.0
;
// strength
}
else
{
}
else
{
...
@@ -6274,7 +6280,7 @@ public class QuadCLTCPU {
...
@@ -6274,7 +6280,7 @@ public class QuadCLTCPU {
clustersY
,
clustersY
,
true
,
true
,
name
+
sAux
()+
"-CLT_MISMATCH-D"
+
clt_parameters
.
disparity
+
"_"
+
clt_parameters
.
tileStep
+
"x"
+
clt_parameters
.
tileStep
,
name
+
sAux
()+
"-CLT_MISMATCH-D"
+
clt_parameters
.
disparity
+
"_"
+
clt_parameters
.
tileStep
+
"x"
+
clt_parameters
.
tileStep
,
ExtrinsicAdjustment
.
DATA_TITLES
);
ea_dbg
.
data_titles
);
//
ExtrinsicAdjustment.DATA_TITLES);
if
(
disparity_map
!=
null
){
if
(
disparity_map
!=
null
){
int
target_index
=
ImageDtt
.
DISPARITY_INDEX_INT
;
int
target_index
=
ImageDtt
.
DISPARITY_INDEX_INT
;
...
@@ -13084,7 +13090,7 @@ public class QuadCLTCPU {
...
@@ -13084,7 +13090,7 @@ public class QuadCLTCPU {
CorrVector
corr_vector
=
geometryCorrection
.
getCorrVector
().
clone
();
CorrVector
corr_vector
=
geometryCorrection
.
getCorrVector
().
clone
();
double
[]
curr_corr_arr
=
corr_vector
.
toArray
();
double
[]
curr_corr_arr
=
corr_vector
.
toArray
();
int
clusters
=
ea
.
clustersX
*
ea
.
clustersY
;
int
clusters
=
ea
.
clustersX
*
ea
.
clustersY
;
int
num_ly
=
ExtrinsicAdjustment
.
INDX_LENGTH
;
// scan.getLazyEyeData().length;
int
num_ly
=
ExtrinsicAdjustment
.
get_INDX_LENGTH
(
getNumSensors
())
;
// scan.getLazyEyeData().length;
int
num_pars
=
curr_corr_arr
.
length
;
int
num_pars
=
curr_corr_arr
.
length
;
double
[][][]
ly_diff
=
new
double
[
num_pars
][
num_ly
][
clusters
];
double
[][][]
ly_diff
=
new
double
[
num_pars
][
num_ly
][
clusters
];
for
(
int
np
=
0
;
np
<
num_pars
;
np
++)
{
for
(
int
np
=
0
;
np
<
num_pars
;
np
++)
{
...
@@ -13208,14 +13214,14 @@ public class QuadCLTCPU {
...
@@ -13208,14 +13214,14 @@ public class QuadCLTCPU {
*/
*/
dbg_img
=
new
double
[
num_pars
][
width
*
height
];
dbg_img
=
new
double
[
num_pars
][
width
*
height
];
for
(
int
par
=
0
;
par
<
num_pars
;
par
++)
{
for
(
int
par
=
0
;
par
<
num_pars
;
par
++)
{
for
(
int
mode
=
0
;
mode
<
ExtrinsicAdjustment
.
POINTS_SAMPLE
;
mode
++)
{
for
(
int
mode
=
0
;
mode
<
ExtrinsicAdjustment
.
get_POINTS_SAMPLE
(
getNumSensors
())
;
mode
++)
{
int
x0
=
(
mode
%
3
)
*
(
ea
.
clustersX
+
gap
);
int
x0
=
(
mode
%
3
)
*
(
ea
.
clustersX
+
gap
);
int
y0
=
(
mode
/
3
)
*
(
ea
.
clustersY
+
gap
);
int
y0
=
(
mode
/
3
)
*
(
ea
.
clustersY
+
gap
);
for
(
int
cluster
=
0
;
cluster
<
clusters
;
cluster
++)
{
for
(
int
cluster
=
0
;
cluster
<
clusters
;
cluster
++)
{
int
x
=
x0
+
(
cluster
%
ea
.
clustersX
);
int
x
=
x0
+
(
cluster
%
ea
.
clustersX
);
int
y
=
y0
+
(
cluster
/
ea
.
clustersX
);
int
y
=
y0
+
(
cluster
/
ea
.
clustersX
);
int
pix
=
x
+
y
*
width
;
int
pix
=
x
+
y
*
width
;
int
indx
=
(
mode
==
0
)
?
ExtrinsicAdjustment
.
INDX_DIFF
:
(
ExtrinsicAdjustment
.
INDX_DD0
+
mode
-
1
);
int
indx
=
(
mode
==
0
)
?
ExtrinsicAdjustment
.
INDX_DIFF
:
(
ExtrinsicAdjustment
.
get_INDX_DD0
(
getNumSensors
())
+
mode
-
1
);
if
(
mode
==
0
)
{
if
(
mode
==
0
)
{
dbg_img
[
par
][
pix
]
=
-
ly_diff
[
par
][
indx
][
cluster
];
dbg_img
[
par
][
pix
]
=
-
ly_diff
[
par
][
indx
][
cluster
];
}
else
{
}
else
{
...
@@ -13234,7 +13240,7 @@ public class QuadCLTCPU {
...
@@ -13234,7 +13240,7 @@ public class QuadCLTCPU {
dbg_img
=
new
double
[
num_pars
][
width
*
height
];
dbg_img
=
new
double
[
num_pars
][
width
*
height
];
for
(
int
par
=
0
;
par
<
num_pars
;
par
++)
{
for
(
int
par
=
0
;
par
<
num_pars
;
par
++)
{
for
(
int
mode
=
0
;
mode
<
ExtrinsicAdjustment
.
POINTS_SAMPLE
;
mode
++)
{
for
(
int
mode
=
0
;
mode
<
ExtrinsicAdjustment
.
get_POINTS_SAMPLE
(
getNumSensors
())
;
mode
++)
{
int
x0
=
(
mode
%
3
)
*
(
ea
.
clustersX
+
gap
);
int
x0
=
(
mode
%
3
)
*
(
ea
.
clustersX
+
gap
);
int
y0
=
(
mode
/
3
)
*
(
ea
.
clustersY
+
gap
);
int
y0
=
(
mode
/
3
)
*
(
ea
.
clustersY
+
gap
);
for
(
int
cluster
=
0
;
cluster
<
clusters
;
cluster
++)
{
for
(
int
cluster
=
0
;
cluster
<
clusters
;
cluster
++)
{
...
...
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