ofxOpenSurf

I kind of remember somebody already posted about SURF + OF, but I did not manage to find the code, so I decided to wrap my own addon.

I started from OpenSurf, which is well documented and friendly licensed (GPL3), then I simply extended ofxCvImage and made a few handy functions to extract SURF points; it’s still betaish, but seems to work well: I could track an image in my webcam feed @30-40fps.

Here’s a few pics.

As soon as I have some time to clean it up I will upload the addon.

Can you upload it plz? (even if not clean enough :P)

here it is: http://code.google.com/p/ofxopensurf/

it’s betaish, but it should give you all you need to Surf inside OF :slight_smile:

hi Enrico,
re: ur ofxOpenSurf addon,
did you ever work out how to get corners working?
im just starting to look into myself…

L.

figured it out.
thinking of putting this onto github if you don’t mind?

  
  
int ofxSurfObjCorners(IpPairVec & matches,const ofPoint src_crn[4],ofPoint dst_crn[4])  
{  
    CvPoint src_corners[ 4 ];  
    CvPoint dst_corners[ 4 ];  
      
    src_corners[ 0 ].x = src_crn[ 0 ].x;  
    src_corners[ 0 ].y = src_crn[ 0 ].y;  
    src_corners[ 1 ].x = src_crn[ 1 ].x;  
    src_corners[ 1 ].y = src_crn[ 1 ].y;  
    src_corners[ 2 ].x = src_crn[ 2 ].x;  
    src_corners[ 2 ].y = src_crn[ 2 ].y;  
    src_corners[ 3 ].x = src_crn[ 3 ].x;  
    src_corners[ 3 ].y = src_crn[ 3 ].y;  
      
    int success = translateCorners( matches, src_corners, dst_corners );  
      
    if( success )  
    {  
        dst_crn[ 0 ].x = dst_corners[ 0 ].x;  
        dst_crn[ 0 ].y = dst_corners[ 0 ].y;  
        dst_crn[ 1 ].x = dst_corners[ 1 ].x;  
        dst_crn[ 1 ].y = dst_corners[ 1 ].y;  
        dst_crn[ 2 ].x = dst_corners[ 2 ].x;  
        dst_crn[ 2 ].y = dst_corners[ 2 ].y;  
        dst_crn[ 3 ].x = dst_corners[ 3 ].x;  
        dst_crn[ 3 ].y = dst_corners[ 3 ].y;  
    }  
      
    return success;  
}  
  

hi.

does anyone have an example file for how to use opensurf?

thx.

this year I used the addon in a open source edutainment project: you can dowload the source code here:

http://naufolio.augmentedrealityag.com/installations/democratizing-technology/