MCPcopy Create free account
hub / github.com/OGRECave/ogre / imshow

Function imshow

Components/Python/HighPy.py:267–283  ·  view source on GitHub ↗

! show an image in the window @param window_name: name of the window @param img_path: path to the image file

(window_name: str, img_path: str | os.PathLike)

Source from the content-addressed store, hash-verified

265 return ret, shape
266
267def imshow(window_name: str, img_path: str | os.PathLike):
268 """!
269 show an image in the window
270 @param window_name: name of the window
271 @param img_path: path to the image file
272 """
273 assert _ctx is not None, "call window_create first"
274 assert window_name in _ctx.windows, f"no window named: {window_name}"
275
276 window_data = _ctx.windows[window_name]
277 if window_data.background is None:
278 window_data.background = _create_image_background(_ctx.windows[window_name].scn_mgr, window_name)
279
280 img = Ogre.Image()
281 img.load(str(img_path), Ogre.RGN_DEFAULT)
282
283 window_data.background.loadImage(img)
284
285def camera_intrinsics(window_name: str, K, imsize):
286 """!

Callers

nothing calls this directly

Calls 4

_create_image_backgroundFunction · 0.85
ImageMethod · 0.80
loadMethod · 0.45
loadImageMethod · 0.45

Tested by

no test coverage detected