Hi :)
Image storing is like storing any other binary data. I have made some experiences with this kind of problem in my Web Dev projects (where you need many assets for web apps). My answers is: take the best of both worlds!
- Do not store binary data in your database. A database was made to handle different kinds of relative values or values which belong together (in general). It's all about values! Binary data slows down everything and makes working with your database difficult.
- You might want to use SQLite3. It can be integrated into your application (no server needed ), it is lightweight and standard. Store your image information + a file name in there
- Make an "images" directory into which you store your images. Since you referenced the file name in your database, you can easily get the correct file from the file system.
- Instead of using a folder, you might as well use an archive to store your stuff. I really like working with 7zip, but you might also try some other other library.
About the detection and comparison, I would start with
OpenCV, if I were you :)