Changeset 4865 for trunk/MagicSoft/Cosy/videodev
- Timestamp:
- 09/05/04 18:56:47 (20 years ago)
- Location:
- trunk/MagicSoft/Cosy/videodev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/videodev/FilterLed.cc
r4699 r4865 227 227 228 228 Execute(leds, xc, yc); 229 229 230 230 // Mark Stars in image 231 231 for (int i=first; i<leds.GetEntriesFast(); i++) … … 233 233 } 234 234 235 236 void FilterLed::ExecuteAndMark(Leds &leds, int xc, int yc, double &bright) const 237 { 238 const Int_t first = leds.GetEntriesFast(); 239 240 Execute(leds, xc, yc, bright); 241 242 // Mark Stars in image 243 for (int i=first; i<leds.GetEntriesFast(); i++) 244 MarkPoint(leds(i)); 245 } 246 235 247 void FilterLed::Execute(int xc, int yc) const 236 248 { … … 240 252 241 253 void FilterLed::Execute(Leds &leds, int xc, int yc) const 254 { 255 double bright; 256 Execute(leds, xc, yc, bright); 257 } 258 259 260 void FilterLed::Execute(Leds &leds, int xc, int yc, double &bright) const 242 261 { 243 262 int x0 = xc-fBox; … … 269 288 sq /= wx*hy; 270 289 290 bright=sum; 291 292 271 293 // 254 because b<=max and not b<max 272 294 const double sdev = sqrt(sq-sum*sum); … … 345 367 346 368 RemoveTwinsInterpol(leds, first, 5); 369 370 347 371 } 348 372 -
trunk/MagicSoft/Cosy/videodev/FilterLed.h
r4076 r4865 22 22 void GetMinMax(const int offset, byte *min, byte *max) const; 23 23 int GetMeanPosition(const int x, const int y, const int box) const; 24 int GetMeanPosition(const int x, const int y, const int box, float &mx, float &my, unsigned int &sum) const; 24 int GetMeanPosition(const int x, const int y, const int box, 25 float &mx, float &my, unsigned int &sum) const; 25 26 void RemoveTwinsInterpol(Leds &leds, Int_t first, Double_t radius) const; 26 27 void DrawBox(const int x1, const int y1, … … 30 31 public: 31 32 FilterLed(byte *img, int w, int h, double cut=2.5) 32 33 : fImg(img), fW(w), fH(h), fBox(w>h?w:h), fCut(cut) 33 34 { 34 35 } 35 36 36 37 FilterLed(byte *img, int w, int h, int box, double cut=2.5) 37 38 : fImg(img), fW(w), fH(h), fBox(box), fCut(cut) 38 39 { 39 40 } 40 41 41 42 void SetBox(int box) { fBox = box; } 42 void SetCut(float cut) { fCut = cut; } 43 43 void SetCut(float cut) { fCut = cut; } 44 44 void FindStar(Leds &leds, int xc, int yc) const; 45 45 void Execute(Leds &leds, int xc, int yc, double &bright) const; 46 46 void Execute(Leds &leds, int xc, int yc) const; 47 47 void Execute(Leds &leds) const { Execute(leds, fW/2, fH/2); } 48 48 void ExecuteAndMark(Leds &leds, int xc, int yc) const; 49 void ExecuteAndMark(Leds &leds, int xc, int yc, double &bright) const; 49 50 void ExecuteAndMark(Leds &leds) const { ExecuteAndMark(leds, fW/2, fH/2); } 50 51 void Execute(int xc, int yc) const;
Note:
See TracChangeset
for help on using the changeset viewer.