summaryrefslogtreecommitdiff
path: root/offsetProject/src/imageStore.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2014-03-14 00:51:24 +0000
committerComment <tim@gray.(none)>2014-03-14 00:51:24 +0000
commitbb852cee91b52b71fccade7d4a1ef065eb0de2f0 (patch)
tree97ded3b49faa5d444fa5e9e6c9e58a04d8440afc /offsetProject/src/imageStore.h
parent8072eb4d248debf2d049548dd5dec21cc0152c52 (diff)
nice
Diffstat (limited to 'offsetProject/src/imageStore.h')
-rw-r--r--offsetProject/src/imageStore.h10
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(){