3

I was wondering if I can get the depth values of an image in Javascript?

Basically what I'm looking for, is to get where the objects of the image are near of far away from the camera (in my case the object is a human face). Something like the image below:

EXAMPLE IMAGE

If anyone know a specific js library that i can do it please let me know. Thanks for your time.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Loizos Vasileiou
  • 674
  • 10
  • 37
  • NOTE: Assuming that no additional hardwares are required (depth/360/dual cameras) but just a web-cam. – Loizos Vasileiou Jan 18 '19 at 14:58
  • you cannot get the physical distances of a pixel irl from a simple image, it does not contains this information – Cinn Jan 18 '19 at 14:59
  • You will need some kind of algorithm to do that kind of parsing for you, and JS is probably not the language you want to do it in. There are probably libraries out there that can generate an approximate depth map based on pixel values, but you probably have to implement it on the server-side. – Terry Jan 18 '19 at 15:04
  • Thank you both for your answer. – Loizos Vasileiou Jan 18 '19 at 15:29

0 Answers0