FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
void ClusterFinder::FindCluster
(
vector<
Led
> &
leds
,
int32_t
x0
=
0
,
int32_t
y0
=
0
,
int32_t
x1
=
0
,
int32_t
y1
=
0
)
inline
Definition at line
118
of file
FilterLed.cc
.
References
mag
.
119
{
120
fX0
= x0;
121
fY0
= y0;
122
fX1
= x1==0?
fW
:x1;
123
fY1
= y1==0?
fH
:y1;
124
125
for
(int32_t x=
fX0
; x<
fX1
; x++)
126
for
(int32_t y=
fY0
; y<
fY1
; y++)
127
{
128
const
uint8_t &b =
fImg
[y*
fW
+x];
129
if
(b==0)
130
continue
;
131
132
const
float
mag
=
FindClusterAt
(x, y);
133
if
(
fCount
>999)
134
{
135
cout <<
"ERROR - Spot with Size>999 detected..."
<< endl;
136
return
;
137
}
138
139
if
(mag>0 &&
fCount
>4)
140
leds.push_back(
Led
(
fSumX
/mag,
fSumY
/mag, 0, mag));
141
}
142
//leds.Compress();
143
}
ClusterFinder::fY0
int32_t fY0
Definition:
FilterLed.cc:25
ClusterFinder::fSumY
float fSumY
Definition:
FilterLed.cc:32
mag
float mag
Definition:
HeadersSQM.h:89
Led
Definition:
Led.h:8
ClusterFinder::fH
uint32_t fH
Definition:
FilterLed.cc:20
ClusterFinder::FindClusterAt
float FindClusterAt(int32_t x, int32_t y)
Definition:
FilterLed.cc:101
ClusterFinder::fY1
int32_t fY1
Definition:
FilterLed.cc:26
ClusterFinder::fImg
uint8_t * fImg
Definition:
FilterLed.cc:17
ClusterFinder::fW
uint32_t fW
Definition:
FilterLed.cc:19
ClusterFinder::fX0
int32_t fX0
Definition:
FilterLed.cc:22
ClusterFinder::fX1
int32_t fX1
Definition:
FilterLed.cc:23
ClusterFinder::fSumX
float fSumX
Definition:
FilterLed.cc:31
ClusterFinder::fCount
uint32_t fCount
Definition:
FilterLed.cc:30
ClusterFinder
Generated on Sun Sep 18 2016 20:50:43 for FACT++ by
1.8.11