Definition at line 277 of file FilterLed.cc.
References ClusterFinder::FindClusterAt(), ClusterFinder::GetSumX(), ClusterFinder::GetSumY(), mag, ClusterFinder::SetLimitingSize(), and ClusterFinder::SetRange().
284 int x0 = max(x-boxx+1, 0);
285 int y0 = max(y-boxy+1, 0);
287 int x1 = min(x+boxx+1-1,
fW);
288 int y1 = min(y+boxy+1-1,
fH);
294 for (
int dx=x0; dx<x1; dx++)
296 for (
int dy=y0; dy<y1; dy++)
298 const unsigned int sumloc =
299 fImg[(dy+0)*
fW + (dx-1)] +
300 fImg[(dy+0)*
fW + (dx+1)] +
317 find.SetLimitingSize(9999);
318 find.SetRange(x0, y0, x1, y1);
320 const float mag = find.FindClusterAt(maxx, maxy);
322 mx = find.GetSumX()/
mag;
323 my = find.GetSumY()/
mag;
325 sum = (int)(mag+0.5);
327 return (
int)my*
fW + (int)mx;