pysdic.create_cordin_analysis#
- create_cordin_analysis(mesh, extrinsics, intrinsic, distortions, images, *, times=None)[source]#
Create an analysis (
pysdic.SDICAnalysis) for a Cordin-like setup: a high-speed camera with one sensor seen through \(N\) points of view (stereo mirror adapter) and a distortion that changes with the frame (rotating mirror).The cameras are built from shared transformations:
\[\text{Camera}[i][f] = \text{Intrinsic} \circ \text{Distortion}[f] \circ \text{Extrinsic}[i]\]and the frame \(f\) contains \(N\) views, the view \(i\) being
View(Camera[i][f], images[f]): the samepysdic.Imageobject is used by all the views of a frame.The transformations are not copied: all the cameras share the same
intrinsicobject, the cameras of a frame share the same distortion and the cameras of a point of view share the same extrinsic. Changing the parameters of one transformation changes all the cameras that use it.The size of the sensor is the size of the images, which must all have the same height and width. 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).extrinsics (Sequence[
pysdic.Transformation]) – The \(N\) extrinsic transformations, one per point of view.intrinsic (
pysdic.Transformation) – The intrinsic transformation of the sensor.distortions (Union[
pysdic.Transformation, Sequence[pysdic.Transformation]]) – The distortion of each frame (a sequence of length \(N_f\)), or one distortion shared by all the frames. In the latter case, the \(N\) cameras are the same for all the frames, as inpysdic.create_splitscreen_analysis().images (Sequence[
pysdic.Image]) – The series of images, one per frame.times (Optional[ArrayLike], optional (default:
None)) – The times of acquisition of the frames, of shape \((N_f,)\), strictly increasing (seepysdic.SDICAnalysis). If None, the times are not defined.
- Returns:
The analysis with \(N\) views per frame.
- Return type:
- Raises:
TypeError – If an input has a wrong type.
ValueError – If the number of distortions is not the number of images, or the images do not all have the same height and width.
Examples
from pysdic import PinholeIntrinsic, create_cordin_analysis analysis = create_cordin_analysis( mesh, extrinsics=[left_extrinsic, right_extrinsic], intrinsic=PinholeIntrinsic.from_matrix(K), distortions=[BrownDistortion(d) for d in frame_distortions], images=images, ) analysis.display_structure("camera") # 2 cameras per frame, different at each frame