FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
void FilterLed::GetMinMax
(
const int
offset
,
uint8_t *
min
,
uint8_t *
max
)
const
private
Definition at line
210
of file
FilterLed.cc
.
211
{
212
*min =
fImg
[0];
213
*max =
fImg
[0];
214
215
uint8_t *s = (uint8_t*)
fImg
;
216
const
uint8_t *e0 = s+
fW
*
fH
;
217
218
//
219
// calculate mean value (speed optimized)
220
//
221
while
(s<e0)
222
{
223
const
uint8_t *e = s+fH-offset;
224
s += offset;
225
226
while
(s<e)
227
{
228
if
(*s>*max)
229
{
230
*max = *s;
231
if
(*max-*min==255)
232
return
;
233
}
234
if
(*s<*min)
235
{
236
*min = *s;
237
if
(*max-*min==255)
238
return
;
239
}
240
s++;
241
}
242
s+=offset;
243
}
244
}
FilterLed::fH
int fH
Definition:
FilterLed.h:14
FilterLed::fW
int fW
Definition:
FilterLed.h:13
FilterLed::fImg
uint8_t * fImg
Definition:
FilterLed.h:12
FilterLed
Generated on Sun Sep 18 2016 20:50:52 for FACT++ by
1.8.11