Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Defines | Enumerations | Functions
imgfeatures.h File Reference

Functions and structures for dealing with image features. More...


Detailed Description

Functions and structures for dealing with image features.

Copyright (C) 2006 Rob Hess <hess@eecs.oregonstate.edu>

Version:
1.1.1-20070119

Definition in file imgfeatures.h.

Go to the source code of this file.

Classes

struct  feature
 Structure to represent an affine invariant image feature. More...

Defines

#define FEATURE_OXFD_COLOR   CV_RGB(255,255,0)
#define FEATURE_LOWE_COLOR   CV_RGB(255,0,255)
#define FEATURE_MAX_D   128
 max feature descriptor length

Enumerations

enum  feature_type { FEATURE_OXFD, FEATURE_LOWE }
 FEATURE_OXFD
FEATURE_LOWE.
enum  feature_match_type { FEATURE_FWD_MATCH, FEATURE_BCK_MATCH, FEATURE_MDL_MATCH }
 FEATURE_FWD_MATCH
FEATURE_BCK_MATCH
FEATURE_MDL_MATCH.

Functions

int import_features (char *filename, int type, struct feature **feat)
 Reads image features from file.
int export_features (char *filename, struct feature *feat, int n)
 Exports a feature set to a file formatted depending on the type of features, as specified in the feature struct's type field.
void draw_features (IplImage *img, struct feature *feat, int n)
 Displays a set of features on an image.
double descr_dist_sq (struct feature *f1, struct feature *f2)
 Calculates the squared Euclidian distance between two feature descriptors.

Function Documentation

double descr_dist_sq ( struct feature f1,
struct feature f2 
)

Calculates the squared Euclidian distance between two feature descriptors.

Parameters:
f1first feature
f2second feature
Returns:
Returns the squared Euclidian distance between the descriptors of f1 and f2.
void draw_features ( IplImage *  img,
struct feature feat,
int  n 
)

Displays a set of features on an image.

Parameters:
imgimage on which to display features
featarray of Oxford-type features
nnumber of features
int export_features ( char *  filename,
struct feature feat,
int  n 
)

Exports a feature set to a file formatted depending on the type of features, as specified in the feature struct's type field.

Parameters:
filenamename of file to which to export features
featfeature array
nnumber of features
Returns:
Returns 0 on success or 1 on error
int import_features ( char *  filename,
int  type,
struct feature **  feat 
)

Reads image features from file.

The file should be formatted either as from the code provided by the Visual Geometry Group at Oxford or from the code provided by David Lowe.

Parameters:
filenamelocation of a file containing image features
typedetermines how features are input. If type is FEATURE_OXFD, the input file is treated as if it is from the code provided by the VGG at Oxford: http://www.robots.ox.ac.uk:5000/~vgg/research/affine/index.html

If type is FEATURE_LOWE, the input file is treated as if it is from David Lowe's SIFT code: http://www.cs.ubc.ca/~lowe/keypoints
featpointer to an array in which to store imported features
Returns:
Returns the number of features imported from filename or -1 on error
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:29 for Jafar by doxygen 1.7.6.1
LAAS-CNRS