pysdic.display_projected_roi#
- display_projected_roi(mesh, camera, *, warp_by=None, margin=0.0, roi_color='orange', 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 ROI (see
compute_projected_roi()).The ROI is drawn along the borders of its pixels: from \(x - 0.5\) to \(x + width - 0.5\) and from \(y - 0.5\) to \(y + height - 0.5\).
- 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 ROI (seecompute_projected_roi()).roi_color (str, optional (default:
"orange")) – The color of the ROI.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 ROI.
show (bool, optional (default:
True)) – Whether to show the figure.
- Returns:
The figure.
- Return type:
- Raises:
ValueError – If no vertex has a finite projection, if the ROI is out of the sensor, or see
compute_projected_roi().