You have to do a lot of research to solve these type of problems. I think that neural networks and machine learning are the best way... but it's a complex problem.
Here you can find awesome publications (http://rodrigob.github.io/are_we_there_yet/build/classificat...). It's something like a bible of neural networks :P