vector RetriveCore::retrive(vector<string> files) { FeatureExtract fe; Mat retriveF; vector< vector<int> > allLenSeq = read(); Mat allGlobal = read(); Mat allLocal = read(); vector<string> cand; int rv = files.size(); for(int i = 0; i < rv; i ++) { retriveF = fe.tomyFeature(files[i]); #ifdef FILTER_BY_LENGTH //the minist edit distance double* dist = distinct(rLenSeq, allLenSeq); cand = filterByLenSeq(cand, dist, allLenSeq); #endif Mat hogFeature = localFeature(retriveF); Mat local_code = spectralHash(hogFeature); cand = filterByCode(cand, local_code, allLocal); printResult(files[i], cand); cand.clear(); retriveF.release(); } }
v8::Handle<v8::Value> V8DOMImplementation::hasFeatureCallback(const v8::Arguments& args) { v8::Local<v8::Object> self = args.Holder(); struct V8DOMImplementationPrivate* privData = V8DOM::toClassPtr<V8DOMImplementationPrivate >(self->GetInternalField(0)); if (false) { } else if (args.Length() == 2 && args[0]->IsString() && args[1]->IsString()) { v8::String::AsciiValue localFeature(args[0]); v8::String::AsciiValue localVersion(args[1]); bool retVal = privData->nativeObj->hasFeature(*localFeature, *localVersion); return v8::Boolean::New(retVal); } throw V8Exception("Parameter mismatch while calling hasFeature"); return v8::Undefined(); }