Installation#
pysdic requires Python 3.11 or later. To install it, you can use the following command:
pip install pysdic
Or install it directly from the GitHub repository using:
pip install git+https://github.com/Artezaru/pysdic.git
Required dependencies#
The following dependencies are installed with pysdic:
NumPy (https://numpy.org/): the arrays of all the objects of the package.
SciPy (https://scipy.org/): sparse matrices, interpolation of the images, spatial searches.
OpenCV (https://opencv.org/): image processing, distortion of images and optical flow.
Matplotlib (https://matplotlib.org/): 2D displays (
pysdic.ImagePlotterand thedisplay_*functions).Pysolve-GN (https://Artezaru.github.io/pysolve-gn/): the Gauss-Newton least squares solver of the optimizations (calibration, SDIC terms).
Optional dependencies#
Some features need an optional package. The optional packages are not imported when pysdic is loaded: a
feature that needs one of them imports it at its first call, and raises an explicit ImportError with the
installation instructions if it is missing. The rest of the package works without them.
Package |
Installation |
Extra |
Used by |
|---|---|---|---|
|
|
The |
|
|
|
||
|
|
Conversion to and from |
|
|
|
3D displays ( |
|
|
|
Conversion to and from |
|
|
|
Ray casting on 3D meshes: |
|
|
|
HDF5 files ( |
All the optional packages are installed with:
pip install pysdic[all]
or one by one with the extras of the table, e.g.:
pip install pysdic[pyvista,open3d]
Note
For vtk, only the light package vtkmodules is imported (import vtk loads every VTK module, which is
slow).
The classes that need an optional package can be checked before their use, e.g. pysdic.Plotter3D.is_available().
Rendering with Blender (pysdic-blender)#
The rendering of synthetic images with Blender (lighting, shading, materials) is provided by a separate package,
pysdic-blender, built on pysdic (see Blender Rendering):
pip install pysdic-blender
It installs pysdic and bpy (Blender as a Python module). bpy exists for only one version of Python per
Blender release: pysdic-blender requires Python 3.13 (bpy 5.1). Use a dedicated environment for the
rendering, e.g.:
python3.13 -m venv blender-env
source blender-env/bin/activate
pip install pysdic-blender