pysdic.create_multicamera_analysis#

create_multicamera_analysis(mesh, cameras, images, *, times=None)[source]#

Create an analysis (pysdic.SDICAnalysis) for \(N\) cameras that each acquire their own series of images.

The frame \(f\) contains \(N\) views, the view \(i\) being View(cameras[i], images[i][f]). Each camera is shared by its views of all the frames (fixed calibration). The number of frames is the length of the series of images, which must be the same for all the cameras.

The displacements of the frames are not set.

Parameters:
  • mesh (pysdic.Mesh) – The mesh of the observed surface (not copied: it is locked by the analysis).

  • cameras (Sequence[pysdic.Camera]) – The \(N\) cameras.

  • images (Sequence[Sequence[pysdic.Image]]) – The \(N\) series of images, images[i][f] being the image of the camera \(i\) at the frame \(f\). The images are used as given (ROI, spline degrees, …) and must have the size of the sensor of their camera.

  • times (Optional[ArrayLike], optional (default: None)) – The times of acquisition of the frames, of shape \((N_f,)\), strictly increasing (see pysdic.SDICAnalysis). If None, the times are not defined.

Returns:

The analysis with \(N\) views per frame.

Return type:

pysdic.SDICAnalysis

Raises:
  • TypeError – If an input has a wrong type.

  • ValueError – If the number of series of images is not \(N\), the series have different lengths, or an image does not match the sensor of its camera.

Examples

from pysdic import Image, create_multicamera_analysis

images = [[Image.from_file(f"cam{i}_{f:03d}.tif") for f in range(10)] for i in range(3)]
analysis = create_multicamera_analysis(mesh, [camera_0, camera_1, camera_2], images)
analysis.n_frames, analysis.n_views(0)  # 10, 3