File: test_depth.py

package info (click to toggle)
python-imgviz 1.7.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,084 kB
  • sloc: python: 3,229; makefile: 15
file content (13 lines) | stat: -rw-r--r-- 252 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
import numpy as np

import imgviz


def test_depth2rgb():
    data = imgviz.data.arc2017()

    depthviz = imgviz.depth2rgb(data["depth"])

    assert depthviz.dtype == np.uint8
    H, W = data["depth"].shape[:2]
    assert depthviz.shape == (H, W, 3)