diff options
Diffstat (limited to 'offsetProject/src/imageStore.h')
| -rw-r--r-- | offsetProject/src/imageStore.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/offsetProject/src/imageStore.h b/offsetProject/src/imageStore.h index a2bd39d..9cde96c 100644 --- a/offsetProject/src/imageStore.h +++ b/offsetProject/src/imageStore.h @@ -3,15 +3,17 @@ #define IMAGE_STORE_SIZE 256 #define MIN_TILE_SIZE 8 -#define MAX_TILE_SIZE 16 +#define MAX_TILE_SIZE 32 -#define FLANN_MATRIX_SIZE 3 +#define FLANN_MATRIX_SIZE 5 #include "ofMain.h" #include "ofxJSONElement.h" #include "ofxOpenCv.h" //#include <opencv/include/opencv2/flann/flann.hpp> +//~9fps@33% 32*3 + using namespace cvflann; long ofToLong(const string& intString); @@ -115,7 +117,7 @@ class imageStore : public ofThread{ Matrix<float> query(test,1,3); Matrix<int> indices(new int[1], query.rows, 1); Matrix<float> dists(new float[1], query.rows, 1); - index->knnSearch(query, indices, dists, 1,SearchParams(10)); + index->knnSearch(query, indices, dists, 1,SearchParams(20)); im=*imageptrs[*indices[0]]; //int i=rand()%imageptrs.size(); //im=images[imageptrs[i]]; @@ -159,6 +161,8 @@ class imageStore : public ofThread{ } } + //void flann(const ofImage& _img){ + //-------------------------- void threadedFunction(){ |
