VLTIF
CS426FinalProject
SurfType Class Reference

#include <SurfType.h>

Inheritance diagram for SurfType:
DetectorType

List of all members.

Public Member Functions

 SurfType ()
 SurfType (const double ht, const int noct, const int noctlay, const int ext, const int up)
 SurfType (SURF_PARAMS const &params)
 SurfType (const SurfType &orig)
virtual ~SurfType ()
virtual void compute_frame (const Mat &img, vector< KeyPoint > &keypoints, vector< Lane > const &lanes) const
virtual void reset_detector ()
virtual string isType () const

Private Attributes

SURF surf
double hessianThreshold
int numOctaves
int numOctaveLayers
bool extended
bool upright

Detailed Description

Definition at line 34 of file SurfType.h.


Constructor & Destructor Documentation

SurfType::SurfType ( )

Definition at line 10 of file SurfType.cpp.

References hessianThreshold, and surf.

                   {
    hessianThreshold = surf.hessianThreshold;
    
    surf = SURF(hessianThreshold, 4, 2, false, true);
}
SurfType::SurfType ( const double  ht,
const int  noct,
const int  noctlay,
const int  ext,
const int  up 
)
SurfType::SurfType ( SURF_PARAMS const &  params)

Definition at line 16 of file SurfType.cpp.

References extended, hessianThreshold, numOctaveLayers, numOctaves, surf, and upright.

                                            :
hessianThreshold(params.hessianThreshold), numOctaves(params.numOctaves), 
numOctaveLayers(params.numOctaveLayers), extended(params.extended), upright(params.upright)
{
    surf = SURF(hessianThreshold, numOctaves, numOctaveLayers, extended, upright);  
}
SurfType::SurfType ( const SurfType orig)

Definition at line 30 of file SurfType.cpp.

                                       {
}
SurfType::~SurfType ( ) [virtual]

Definition at line 33 of file SurfType.cpp.

                    {
}

Member Function Documentation

void SurfType::compute_frame ( const Mat &  img,
vector< KeyPoint > &  keypoints,
vector< Lane > const &  lanes 
) const [virtual]

Run surf on the current frame and output the keypoints and their descriptors

Parameters:
[in]imgImage to be evaluated
[out]keypointsKeypoints to be shown

Implements DetectorType.

Definition at line 36 of file SurfType.cpp.

References insideLane(), and surf.

                                                                                                        {
    
    keypoints.clear();
    vector<KeyPoint> points;
    surf(img, Mat(), points);
    
    for( size_t i=0; i<points.size(); i++)
        if( insideLane(points[i].pt, lanes) == true ){
            keypoints.push_back(points[i]);
        }
    
}
string DetectorType::isType ( ) const [virtual, inherited]

Reimplemented in SiftType.

Definition at line 19 of file DetectorType.cpp.

                                 {
    return "DetectorType";
}
void SurfType::reset_detector ( ) [virtual]

Implements DetectorType.

Definition at line 49 of file SurfType.cpp.

                             {
    throw string("ERROR: not implemented yet");
}

Member Data Documentation

bool SurfType::extended [private]

Definition at line 58 of file SurfType.h.

Referenced by SurfType().

double SurfType::hessianThreshold [private]

Definition at line 55 of file SurfType.h.

Referenced by SurfType().

Definition at line 57 of file SurfType.h.

Referenced by SurfType().

int SurfType::numOctaves [private]

Definition at line 56 of file SurfType.h.

Referenced by SurfType().

SURF SurfType::surf [private]

Definition at line 54 of file SurfType.h.

Referenced by compute_frame(), and SurfType().

bool SurfType::upright [private]

Definition at line 59 of file SurfType.h.

Referenced by SurfType().


The documentation for this class was generated from the following files: