This is not an easy task, ideally, of course, artificial intelligence should deal with such tasks. All of this is already possible to realize even through ordinary cameras.Technologies of this level are available thanks to the "Dioram" company. There you will find all the details of the technology and you can personally consult.