Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
What you ask for is not simple, not simple at all. In fact there are very highly funded projects still running that are looking into it.
Google can help: it will get you to some of the research results, which you will have to interpret and possibly implement. Do not expect it to be an easy ride though - there is a lot of work, and a lot of failure waiting for you:
Google[
^]