1 | initial version |
There were two bugs in the above code, that i found in the meantime:
descriptors_vec.push_back(descriptors)
. However i should write descriptors_vec.push_back(descriptors.clone())
, otherwise the reference get's appended and all descriptors in descriptors_vec
have the same content.std::vector<std::vector<DMatch>> knn_matches
declared outside of the for-loop makes the matcher append to it every time new matches are computed.Resolving these two issues made the code run as i intended it to. As a bonus the code now runs on all 4 threads all by itself. :-)