A very good sample of well using Raspberry Pi to detect perspective depth with simple cameras:
The demonstration is of stereo depth perception, i.e. getting depth information from the different views seen by two cameras spaced a short distance apart. This also makes use of another exciting feature of the Pi Compute Module, which is its support for two cameras (the standard Pi only supports one).
– Maybe possible to use thermosensors(like AMG8833) to have a better result and another dimension