compute depth in images