MCPcopy Create free account
hub / github.com/Ar-Ray-code/lingbot-depth-trt / _get_device

Function _get_device

python/scripts/camera/orbbec.py:97–105  ·  view source on GitHub ↗
(info: DeviceInfo)

Source from the content-addressed store, hash-verified

95
96
97def _get_device(info: DeviceInfo) -> Any:
98 ob = _ob()
99 ctx = ob.Context()
100 devices = ctx.query_devices()
101 if info.get("serial"):
102 return devices.get_device_by_serial_number(info["serial"])
103 if info.get("uid"):
104 return devices.get_device_by_uid(info["uid"])
105 return devices.get_device_by_index(int(info["index"]))
106
107
108def _reshape_color(data: np.ndarray, height: int, width: int, channels: int) -> np.ndarray:

Callers 1

startMethod · 0.85

Calls 1

_obFunction · 0.85

Tested by

no test coverage detected