Loading ...
Sorry, an error occurred while loading the content.
 

About VisObjectEvents

Expand Messages
  • tencuid
    Hi, I m tweaking a bit with object detection code as, when an object is detected I can only know about its centroid (x and y coordinates), and I would like to
    Message 1 of 4 , Jan 10, 2005
      Hi,
      I'm tweaking a bit with object detection code as, when an object
      is detected I can only know about its centroid (x and y coordinates),
      and I would like to know about its bounding box /area. I think that
      BallDetectionGenerator.cc is the class which sends object detection
      events to event router and (theorically) it would not be too difficult
      to change it, adding to "createEvent" function additional fields, as
      x1,x2,y1,y2, of "region" object. But I'm worried about the impact of
      those little changes over the whole Tekkotsu project as I don't know
      if there are many classes depending on this type of events. If I
      change "createEvent" parameters in "BallDetectionGenerator", it would
      be enough to change some code in "VisObjectEvents", or some major
      changes would be neccessary?
      Thanks.
    • Samantha Vincent
      Hi, I m also interested in this, as I need the area of the region, currently I just moved all the code inside my behavior but eventually that will all have to
      Message 2 of 4 , Jan 10, 2005
        Hi,

        I'm also interested in this, as I need the area of the region,
        currently I just moved all the code inside my behavior but eventually
        that will all have to be cleaned up, if there is a clean way to tweak
        BallDetectionGenerator that would be the ideal way to do it.

        Thanks,
        Sam


        On Mon, 10 Jan 2005 12:39:40 -0000, tencuid <nhr@...> wrote:
        >
        > Hi,
        > I'm tweaking a bit with object detection code as, when an object
        > is detected I can only know about its centroid (x and y coordinates),
        > and I would like to know about its bounding box /area. I think that
        > BallDetectionGenerator.cc is the class which sends object detection
        > events to event router and (theorically) it would not be too difficult
        > to change it, adding to "createEvent" function additional fields, as
        > x1,x2,y1,y2, of "region" object. But I'm worried about the impact of
        > those little changes over the whole Tekkotsu project as I don't know
        > if there are many classes depending on this type of events. If I
        > change "createEvent" parameters in "BallDetectionGenerator", it would
        > be enough to change some code in "VisObjectEvents", or some major
        > changes would be neccessary?
        > Thanks.
        >
        >
        >
        >
        > ________________________________
        > Yahoo! Groups Links
        >
        > To visit your group on the web, go to:
        > http://groups.yahoo.com/group/tekkotsu_dev/
        >
        > To unsubscribe from this group, send an email to:
        > tekkotsu_dev-unsubscribe@yahoogroups.com
        >
        > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      • Ethan Tira-Thompson
        That sounds like a good plan - BallDetectionGenerator is the only thing that calls its createEvent function, so that shouldn t be a problem to change, and
        Message 3 of 4 , Jan 10, 2005
          That sounds like a good plan - BallDetectionGenerator is the only thing
          that calls its createEvent function, so that shouldn't be a problem to
          change, and existing code will simply ignore the new fields.

          I would suggest adding get{Left,Right,Top,Bottom,Width,Height}()
          accessor functions to VisionObjectEvent so it doesn't matter to users
          how the class actually internally stores the information. Since
          center{X,Y} is already stored, could just add a field for the width and
          height, or you could take out _cen{X,Y} and replace it with x1,y1,x2,y2
          (or x,y,width,height) -- whatever you think will be the easiest to
          implement or most efficient for the most common calls. It doesn't
          really matter as long as accessor functions are in place...

          While on the subject of beefing up VisionObjectEvent, another issue to
          take care of now is how to signal out of bounds - it would be
          straightforward enough to define the way to check for an object
          extending out of the camera frame as:
          VisionObjectEvent e=[...]
          if(e.getLeft()<-1 || e.getRight()>1) {
          //extends out of image
          }
          Any thoughts on that convention? (perhaps as opposed to a flag accessor,
          e.g. isClippedLeft() || isClippedRight() -- could have both...)

          It looks like there's some interest in this idea (myself included!) so
          if you don't mind, please send a patch (or the modified files) when
          you're done and then I can incorporate it into CVS.

          -ethan


          tencuid wrote:

          >
          > Hi,
          > I'm tweaking a bit with object detection code as, when an object
          > is detected I can only know about its centroid (x and y coordinates),
          > and I would like to know about its bounding box /area. I think that
          > BallDetectionGenerator.cc is the class which sends object detection
          > events to event router and (theorically) it would not be too difficult
          > to change it, adding to "createEvent" function additional fields, as
          > x1,x2,y1,y2, of "region" object. But I'm worried about the impact of
          > those little changes over the whole Tekkotsu project as I don't know
          > if there are many classes depending on this type of events. If I
          > change "createEvent" parameters in "BallDetectionGenerator", it would
          > be enough to change some code in "VisObjectEvents", or some major
          > changes would be neccessary?
          > Thanks.
        • Ethan Tira-Thompson
          I should mention that this patch was submitted and has been tested and checked into CVS. More info: http://bugs.tekkotsu.org/show_bug.cgi?id=74#c1 Is there a
          Message 4 of 4 , Jan 17, 2005
            I should mention that this patch was submitted and has been tested and checked into CVS.
            More info:  http://bugs.tekkotsu.org/show_bug.cgi?id=74#c1

            Is there a need to provide pointer(s) to the CMVision region(s) corresponding to the object?  With the information now available in VisionObjectEvents themselves, I'd rather not in order to protect abstraction between layers, but I could be swayed if there's still something missing...

            -ethan

            tencuid wrote:

            Hi,
               I'm tweaking  a bit with object detection code as, when an object
            is detected I can only know about its centroid (x and y coordinates),
            and I would like to know about its bounding box /area. I think that
            BallDetectionGenerator.cc is the class which sends object detection
            events to event router and (theorically) it would not be too difficult
            to change it, adding to "createEvent" function additional fields, as
            x1,x2,y1,y2, of "region" object. But I'm worried about the impact of
            those little changes over the whole Tekkotsu project as I don't know
            if there are many classes depending on this type of events. If I
            change  "createEvent" parameters in "BallDetectionGenerator", it would
            be enough to change some code in "VisObjectEvents", or some major
            changes would be neccessary?
            Thanks.




          Your message has been successfully submitted and would be delivered to recipients shortly.