Go to the documentation of this file.00001
00018 #ifndef KDTREE_H
00019 #define KDTREE_H
00020
00021 #include <cxcore.h>
00022
00023
00024
00025
00026 struct feature;
00027
00029 struct kd_node
00030 {
00031 int ki;
00032 double kv;
00033 int leaf;
00034 struct feature* features;
00035 int n;
00036 struct kd_node* kd_left;
00037 struct kd_node* kd_right;
00038 };
00039
00040
00041
00042
00051 extern struct kd_node* kdtree_build( struct feature* features, int n );
00052
00053
00054
00069 extern int kdtree_bbf_knn( struct kd_node* kd_root, struct feature* feat,
00070 int k, struct feature*** nbrs, int max_nn_chks );
00071
00072
00091 extern int kdtree_bbf_spatial_knn( struct kd_node* kd_root,
00092 struct feature* feat, int k,
00093 struct feature*** nbrs, int max_nn_chks,
00094 CvRect rect, int model );
00095
00096
00102 extern void kdtree_release( struct kd_node* kd_root );
00103
00104
00105 #endif