pysdic.Image.get_image_image_points#
- Image.get_image_image_points(mask=None)[source]#
Create a grid of image points covering the entire image.
The method is equivalent to the following code:
import numpy pixel_points = numpy.indices((height, width)).reshape(2, -1).T pixel_points = pixel_points[mask.flatten()] # If mask is provided pixel_points = pixel_points.astype(numpy.float64) image_points = pixel_points[:, [1, 0]] # Swap to get image points (x, y)
- Parameters:
mask (Optional[ArrayLike], optional) – A boolean mask to filter the image points. If None, all image points are returned. Default is None. Shape (\(H \times W\),) or (\(H\), \(W\)) where \(H\) is the height and \(W\) is the width of the camera sensor.
- Returns:
A 2D array of shape (\(N_p\), 2) where \(N_p\) is the number of image points in float64 dtype. Each row represents an image point in image coordinate system \((x, y)\).
- Return type:
- Raises:
ValueError – If the image is not set.