diff options
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c index d3e65685..b7cf4c31 100644 --- a/src/image.c +++ b/src/image.c @@ -145,3 +145,20 @@ struct imagefeature *image_feature_closest(ImageFeatureList *flist, *d = +INFINITY; return NULL; } + + +int image_feature_count(ImageFeatureList *flist) +{ + if ( flist == NULL ) return 0; + return flist->n_features; +} + + +struct imagefeature *image_get_feature(ImageFeatureList *flist, int idx) +{ + /* Sanity check */ + if ( flist == NULL ) return NULL; + if ( idx > flist->n_features ) return NULL; + + return &flist->features[idx]; +} |