pysdic.display_projected_bounding_box#
- display_projected_bounding_box(mesh, camera, *, warp_by=None, margin=0.0, box_color='red', figsize=None, title=None, show=True)[source]#
Display the mesh projected on the sensor of a camera (on the image of a view) with its projected bounding box (see
compute_projected_bounding_box()).- Parameters:
mesh (
pysdic.Mesh) – The mesh (with an element type), of dimension \(E\) equal to the input dimension of the camera.camera (Union[
pysdic.Camera,pysdic.View]) – The camera (drawn on its sensor), or a view (drawn on its image).warp_by (Optional[Union[str, ArrayLike]], optional) – The displacement of the vertices (name of a vertex property or array of shape \((N_v, E)\)).
margin (Real, optional (default:
0.0)) – The margin in pixels of the box (seecompute_projected_bounding_box()).box_color (str, optional (default:
"red")) – The color of the box.figsize (Optional[Tuple[Real, Real]], optional) – The size of the figure in inches (width, height). Default:
(8, 6).title (Optional[str], optional) – The title of the figure. By default, the box.
show (bool, optional (default:
True)) – Whether to show the figure.
- Returns:
The figure.
- Return type:
- Raises:
ValueError – If no vertex has a finite projection, or see
compute_projected_bounding_box().