1 | initial version |
I don't understand your idea.
Anyway time required for matching doesn't depends from storage type but from algorithm used for. If you have to search an image A into a set of N images you have to performs N matches. After this, you can save matching results in a file or in a DB.
You could use threads to perform more than 1 match at time but I don't know how much you will gain considering enhanced parallelization built in OpenCV (it depends on your build cfg of ocv)
Yes you could save some key points (or features) in a DB or xml file for further query, but largest time would remains key points (or features) calculation.
FLANN performs a quick and efficient matching rotation and scale invariant.
If you are looking for identical images, may be simple image difference or Histogram Comparison could be enough.
Finally if you want to use SQLite with OpenCV please follow some "SQLite C/C++ Tutorial" on the net.
I don't like to store images into a DB but in case you need to store a cv::Mat
into a SQLite field then define your field as binary and use imdecode/imencode to read/encode an image from/to a memory buffer.