! 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)
| 265 | return ret, shape |
| 266 | |
| 267 | def 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 | |
| 285 | def camera_intrinsics(window_name: str, K, imsize): |
| 286 | """! |
nothing calls this directly
no test coverage detected