source: trunk/MagicSoft/Cosy/videodev/CaosFilter.h@ 6146

Last change on this file since 6146 was 2278, checked in by tbretz, 21 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
41
42public:
43 static void Execute(byte *img, float *xw, float *yw, float *xl, float *yl,
44 float &prx, float &pry, float &pr, float *v, float *w);
45
46 static void Execute(byte *img, Leds &leds, Double_t conv);
47
48 static void FilterLeds(Leds &leds);
49 static void RemoveTwins(Leds &leds, Double_t radius);
50
51 ClassDef(CaosFilter, 0)
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.