Ignore:
Timestamp:
09/05/04 18:56:47 (20 years ago)
Author:
rwagner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/videodev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/videodev/FilterLed.cc

    r4699 r4865  
    227227
    228228    Execute(leds, xc, yc);
    229 
     229 
    230230    // Mark Stars in image
    231231    for (int i=first; i<leds.GetEntriesFast(); i++)
     
    233233}
    234234
     235
     236void 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
    235247void FilterLed::Execute(int xc, int yc) const
    236248{
     
    240252
    241253void FilterLed::Execute(Leds &leds, int xc, int yc) const
     254{
     255    double bright;
     256    Execute(leds, xc, yc, bright);
     257}
     258
     259
     260void FilterLed::Execute(Leds &leds, int xc, int yc, double &bright) const
    242261{
    243262    int x0 = xc-fBox;
     
    269288    sq  /= wx*hy;
    270289
     290    bright=sum;
     291
     292   
    271293    // 254 because b<=max and not b<max
    272294    const double sdev = sqrt(sq-sum*sum);
     
    345367
    346368    RemoveTwinsInterpol(leds, first, 5);
     369   
     370   
    347371}
    348372
  • trunk/MagicSoft/Cosy/videodev/FilterLed.h

    r4076 r4865  
    2222    void GetMinMax(const int offset, byte *min, byte *max) const;
    2323    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;
    2526    void RemoveTwinsInterpol(Leds &leds, Int_t first, Double_t radius) const;
    2627    void DrawBox(const int x1, const int y1,
     
    3031public:
    3132    FilterLed(byte *img, int w, int h, double cut=2.5)
    32         : fImg(img), fW(w), fH(h), fBox(w>h?w:h), fCut(cut)
     33      : fImg(img), fW(w), fH(h), fBox(w>h?w:h), fCut(cut)
    3334    {
    3435    }
    3536
    3637    FilterLed(byte *img, int w, int h, int box, double cut=2.5)
    37         : fImg(img), fW(w), fH(h), fBox(box), fCut(cut)
     38      : fImg(img), fW(w), fH(h), fBox(box), fCut(cut)
    3839    {
    3940    }
    4041
    4142    void SetBox(int box)   { fBox = box; }
    42     void SetCut(float cut) { fCut = cut; }
    43 
     43    void SetCut(float cut) { fCut = cut; }
    4444    void FindStar(Leds &leds, int xc, int yc) const;
    45 
     45    void Execute(Leds &leds, int xc, int yc, double &bright) const;
    4646    void Execute(Leds &leds, int xc, int yc) const;
    4747    void Execute(Leds &leds) const { Execute(leds, fW/2, fH/2); }
    4848    void ExecuteAndMark(Leds &leds, int xc, int yc) const;
     49    void ExecuteAndMark(Leds &leds, int xc, int yc, double &bright) const;
    4950    void ExecuteAndMark(Leds &leds) const { ExecuteAndMark(leds, fW/2, fH/2); }
    5051    void Execute(int xc, int yc) const;
Note: See TracChangeset for help on using the changeset viewer.