pysdic.workflows.select_visible_integration_points#
- select_visible_integration_points(analysis, integration_points, *, frames=None, tolerance=None)[source]#
Select the integration points visible in all the views of some frames of an analysis.
A point is kept if it is located in the mesh and, in every view
(f, v)of the frames, with the mesh deformed by the displacement of the frame \(f\):3D mesh: it is visible (see
pysdic.compute_visibility()): projected in the domain of the pixel centers and in the ROI of the image, and not hidden by the mesh;2D mesh: its gray level is finite (projected in the ROI of the image), the plane cannot hide itself.
Use it before building a
pysdic.SDICCorrelationTerm: the term does not handle the occlusions, and a point out of a ROI gives NaN residuals.Important
A 3D mesh requires the optional package
open3d(pip install open3d).- Parameters:
analysis (
pysdic.SDICAnalysis) – The analysis, with the displacements of the frames set.integration_points (
pysdic.IntegrationPoints) – The points to select, consistent with the mesh of the analysis.frames (Optional[Sequence[Integral]], optional) – The frames whose views are checked. By default, all the frames with views.
tolerance (Optional[Real], optional) – The tolerance of the occlusions (3D mesh), see
pysdic.compute_visibility().
- Returns:
The visible points, their mask and the visibility in each view.
- Return type:
- Raises:
ValueError – If a frame has no view or no displacement set, or the integration points are not consistent with the mesh.
Examples
from pysdic.workflows import create_grid_integration_points, select_visible_integration_points grid = create_grid_integration_points(analysis.mesh, 6) selection = select_visible_integration_points(analysis, grid) print(f"{selection.n_removed} hidden points removed") integration_points = selection.integration_points