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
cf2efd71
Commit
cf2efd71
authored
Oct 19, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debug
parent
faccb50f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
MatchSimulatedPattern.java
src/main/java/MatchSimulatedPattern.java
+12
-11
No files found.
src/main/java/MatchSimulatedPattern.java
View file @
cf2efd71
...
@@ -10478,7 +10478,7 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
...
@@ -10478,7 +10478,7 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
int
bayerG2
=
3
;
int
bayerG2
=
3
;
int
bayerR
=
1
;
int
bayerR
=
1
;
double
avrgGreenB
=
0.0
;
double
avrgGreenB
=
0.0
;
double
avrgGreenP
=
0.0
;
//
double avrgGreenP=0.0;
int
len
=
backgroundBayer
[
bayerG1
].
length
;
int
len
=
backgroundBayer
[
bayerG1
].
length
;
int
halfWidth
=
width
/
2
;
int
halfWidth
=
width
/
2
;
int
halfHeight
=
len
/
halfWidth
;
int
halfHeight
=
len
/
halfWidth
;
...
@@ -10491,10 +10491,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
...
@@ -10491,10 +10491,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
if
(
modBackground
)
backgroundBayer
[
bayerG1
][
i
]=
0.5
*(
backgroundBayer
[
bayerG1
][
i
]+
backgroundBayer
[
bayerG2
][
i
]);
if
(
modBackground
)
backgroundBayer
[
bayerG1
][
i
]=
0.5
*(
backgroundBayer
[
bayerG1
][
i
]+
backgroundBayer
[
bayerG2
][
i
]);
avrgGreenB
+=
backgroundBayer
[
bayerG1
][
i
];
avrgGreenB
+=
backgroundBayer
[
bayerG1
][
i
];
pointedBayer
[
bayerG1
][
i
]=
0.5
*(
pointedBayer
[
bayerG1
][
i
]+
pointedBayer
[
bayerG2
][
i
]);
pointedBayer
[
bayerG1
][
i
]=
0.5
*(
pointedBayer
[
bayerG1
][
i
]+
pointedBayer
[
bayerG2
][
i
]);
avrgGreenP
+=
pointedBayer
[
bayerG1
][
i
];
//
avrgGreenP+=pointedBayer[bayerG1][i];
}
}
avrgGreenB
/=
len
;
avrgGreenB
/=
len
;
avrgGreenP
/=
len
;
//
avrgGreenP/=len;
for
(
int
i
=
0
;
i
<
len
;
i
++){
for
(
int
i
=
0
;
i
<
len
;
i
++){
if
(
modBackground
)
{
if
(
modBackground
)
{
backgroundBayer
[
bayerR
][
i
]/=(
backgroundBayer
[
bayerG1
][
i
]*(
1.0
-
this
.
greenFloor
)+
avrgGreenB
*
this
.
greenFloor
);
backgroundBayer
[
bayerR
][
i
]/=(
backgroundBayer
[
bayerG1
][
i
]*(
1.0
-
this
.
greenFloor
)+
avrgGreenB
*
this
.
greenFloor
);
...
@@ -10655,10 +10655,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
...
@@ -10655,10 +10655,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
}
}
}
else
if
(
this
.
algorithmNumber
==
1
){
}
else
if
(
this
.
algorithmNumber
==
1
){
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++)
{
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++)
{
int
numSamples
=
0
;
//
int numSamples=0;
int
numPositiveSamples
=
0
;
int
numPositiveSamples
=
0
;
for
(
int
nImg
=
startIndex
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
for
(
int
nImg
=
startIndex
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
numSamples
++;
//
numSamples++;
if
(
whichOn
[
numPointer
][
nImg
])
numPositiveSamples
++;
if
(
whichOn
[
numPointer
][
nImg
])
numPositiveSamples
++;
}
}
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
...
@@ -10674,10 +10674,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
...
@@ -10674,10 +10674,10 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
}
else
if
(
this
.
algorithmNumber
==
2
){
}
else
if
(
this
.
algorithmNumber
==
2
){
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++)
{
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++)
{
int
numSamples
=
0
;
int
numSamples
=
0
;
int
numPositiveSamples
=
0
;
//
int numPositiveSamples=0;
for
(
int
nImg
=
startIndex
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
for
(
int
nImg
=
startIndex
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
numSamples
++;
numSamples
++;
if
(
whichOn
[
numPointer
][
nImg
])
numPositiveSamples
++;
//
if (whichOn[numPointer][nImg]) numPositiveSamples++;
}
}
double
pwr
=
1.0
/
numSamples
;
double
pwr
=
1.0
/
numSamples
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
...
@@ -10726,21 +10726,22 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
...
@@ -10726,21 +10726,22 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
noise
=
new
double
[
whichOn
.
length
][];
noise
=
new
double
[
whichOn
.
length
][];
if
(
debugLevel
>
debugTiming
)
printTiming
(
"alg_"
+
this
.
algorithmNumber
+
"-start-"
+
title
);
if
(
debugLevel
>
debugTiming
)
printTiming
(
"alg_"
+
this
.
algorithmNumber
+
"-start-"
+
title
);
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++){
for
(
int
numPointer
=
0
;
numPointer
<
whichOn
.
length
;
numPointer
++){
if
(
debugLevel
>
debugTiming
)
printTiming
(
"numPointer-"
+
numPointer
+
"-"
+
title
);
if
(
debugLevel
>
debugTiming
)
printTiming
(
"numPointer-"
+
numPointer
+
"-"
+
whichOn
[
numPointer
].
length
+
"-"
+
len
+
"-"
+
title
);
noise
[
numPointer
]=
new
double
[
len
];
noise
[
numPointer
]=
new
double
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++){
for
(
int
i
=
0
;
i
<
len
;
i
++){
double
d
=
0.0
;
//
double d=0.0;
avOn
=
0.0
;
avOn
=
0.0
;
avOff
=
0.0
;
avOff
=
0.0
;
for
(
int
nImg
=
1
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
for
(
int
nImg
=
1
;
nImg
<
whichOn
[
numPointer
].
length
;
nImg
++){
if
(
whichOn
[
numPointer
][
nImg
])
{
if
(
whichOn
[
numPointer
][
nImg
])
{
d
+=
reds
[
nImg
][
i
];
//
d+=reds[nImg][i];
avOn
+=
reds
[
nImg
][
i
];
avOn
+=
reds
[
nImg
][
i
];
}
else
{
}
else
{
d
-=
reds
[
nImg
][
i
];
//
d-=reds[nImg][i];
avOff
+=
reds
[
nImg
][
i
];
avOff
+=
reds
[
nImg
][
i
];
}
}
}
}
double
d
=
avOn
-
avOff
;
diffOnOff
[
numPointer
][
i
]=
d
/(
whichOn
[
numPointer
].
length
-
1
);
diffOnOff
[
numPointer
][
i
]=
d
/(
whichOn
[
numPointer
].
length
-
1
);
avOn
/=((
whichOn
[
numPointer
].
length
-
1
)/
2
);
avOn
/=((
whichOn
[
numPointer
].
length
-
1
)/
2
);
avOff
/=((
whichOn
[
numPointer
].
length
-
1
)/
2
);
avOff
/=((
whichOn
[
numPointer
].
length
-
1
)/
2
);
...
...
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