source: trunk/Cosy/videodev/CaosFilter.h@ 18213

Last change on this file since 18213 was 8809, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef CAOSFILTER_H
2#define CAOSFILTER_H
3
4#ifndef __CINT__
5#include <TROOT.h>
6#endif
7
8typedef unsigned char byte;
9
10class Leds;
11
12class CaosFilter
13{
14 static void DrawBox(const int x1, const int y1,
15 const int x2, const int y2,
16 byte *buffer, const int col);
17
18 static void MarkPoint(const int x, const int y,
19 byte *buffer, const int col);
20
21 static void GetStat(const byte *buffer, const int offset,
22 double *mean, double *sdev);
23
24 static int GetMeanPosition(const byte *bitmap,
25 const int x, const int y,
26 const int box);
27
28 static int GetMeanPosition(const byte *bitmap, const int x, const int y,
29 const int box, Float_t &mx, Float_t &my);
30
31 static bool CalcCenter(Float_t *px, Float_t *py, Float_t &cx, Float_t &cy, Float_t &R);
32
33 static void InterpolCenter(int &m, Float_t *x, Float_t *y, Float_t &px, Float_t &py,
34 Float_t &pr, Float_t &sx, Float_t &sy, Float_t &sr);
35
36 static void CalcRings(int &m, Float_t *x, Float_t *y, Float_t &px, Float_t &py,
37 Float_t &pr, float *v, float *w);
38
39 static int FilterLeds(float *xw, float *yw, float *xl, float *yl);
40
41public:
42 virtual ~CaosFilter() { }
43
44 static void Execute(byte *img, float *xw, float *yw, float *xl, float *yl,
45 float &prx, float &pry, float &pr, float *v, float *w);
46
47 static void Execute(byte *img, Leds &leds, Double_t conv);
48
49 static void FilterLeds(Leds &leds);
50 static void RemoveTwins(Leds &leds, Double_t radius);
51
52 ClassDef(CaosFilter, 0)
53};
54
55#endif
Note: See TracBrowser for help on using the repository browser.