gventer/SUN-DIC
Stellenbosch University DIC Code
SUN-DIC
Stellenbosch University Digital Image Correlation (DIC) Code
Important Notice
This is an early release of the Stellenbosch University DIC Code, referred to as SUN-DIC. The code includes the following features and limitations. If you encounter issues or have suggestions for improvement, please contact the author. Additional documentation will be provided in future updates.
Publications
2025-10-14 -- Venter, Gerhard and Neaves, Melody, SUN-DIC: A Python-Based Open-Source Software Tool for Digital Image Correlation, Advances in Engineering Software, Volume 211, 2025.
Presentations
Limitations
- Currently supports only 2D planar problems (a stereo version is under development).
- Only rectangular regions of interest (ROI) can be specified. However, subsets with an all-black background (based on a user-defined threshold) is ignored thus allowing the code to handle irregularly shaped domains.
- Limited documentation. Please see the
settings.inifile for complete documentation on the options and thetest_sundic.ipynbfile as a working example of using the API. These files are included as a working example (with sample image files) which can be accessed by issuing thecopy-examplescommand after installation. Please see below.
Key Features
- Fully open-source, utilizing standard Python libraries wherever possible.
- Offers both a user-friendly GUI and an API for interaction.
- Implements the Zero-Mean Normalized Sum of Squared Differences (ZNSSD) correlation criterion.
- Features an advanced starting strategy using the AKAZE feature detection algorithm for initial guess generation.
- Supports both linear (affine) and quadratic shape functions.
- Includes Inverse Compositional Gauss-Newton (IC-GN) and Inverse Compositional Levenberg-Marquardt (IC-LM) solvers.
- Provides absolute and relative update strategies for handling multiple image pairs.
- Computes displacements and strains.
- Utilizes Savitzky-Golay smoothing for strain calculations. Displacements can also be smoothed using the same algorithm.
- Supports parallel computing for improved performance.
- Easy installation via PyPI.
Installation
Although installation can be performed without creating a virtual environment, it is highly recommended to use one for easier dependency management.
General Steps
- Create a virtual environment.
- Activate the virtual environment.
- Install the package from PyPI.
- Copy the example problem to the current working directory by typing
copy-examples. A complete working example is provided by the following files:test_sundic.ipynbsettings.iniplanar_imagesfolder
These files provide practical starting point for using both the API or GUI.
Using pip
-
Create a virtual environment (e.g.,
sundic):python3.11 -m venv sundic -
Activate the virtual environment:
source sundic/bin/activate -
Install the package:
pip install SUN-DIC -
Copy the example problem:
copy-examples
Using conda
-
Create a virtual environment (e.g.,
sundic) with Python pre-installed:conda create -n sundic python=3.11 -
Activate the virtual environment:
conda activate sundic -
Install the package:
pip install SUN-DIC -
. Copy the example problem:
copy-examples
Installing Directly from GitHub (Advanced users only)
-
Create and activate a virtual environment using either
piporcondaas outlined above. -
Clone the repository and install the package:
git clone https://github.com/gventer/SUN-DIC.git pip install ./SUN-DIC -
The example problem can then be found in the
SUN-DIC/sundic/examplesdirectory.
Usage
Make sure the virtual environment where SUN-DIC is installed is active before proceeding.
Starting the GUI
- Type
sundicin the terminal to launch the GUI. - Use the
copy-examplescommand to copy a complete working example to the current working directory. - Follow the workflow outlined on the left-hand side of the GUI. Hovering over any entry provides helpful tooltips.
Using the API
- Use the
copy-examplescommand to copy a complete working example to the current working directory. - Open the
test_sundic.ipynbJupyter Notebook for a detailed working example. - The typical workflow involves:
- Modifying the
settings.inifile. - Running the DIC analysis.
- Post-processing the results.
- Modifying the
- While the example uses a Jupyter Notebook, the API can also be used in standard Python
.pyscripts.
API Documentation
Detailed API documentation is available at:
https://gventer.github.io/SUN-DIC
Acknowledgments
- SUN-DIC Analysis Code: Based on work by Ed Brisley as part of his MEng degree at Stellenbosch University. His thesis is available at the Stellenbosch University Library.
- Interpolator: Utilizes
fast_interpby David Stein, licensed under Apache 2.0. Repository: fast_interp. - Smoothing Algorithm: Implements the 2D Savitzky-Golay algorithm from the SciPy Cookbook.
- GUI Development: Initial development by Elijah Stockhall.
- Graphical Design: Dr Melody Neaves
License
This project is licensed under the MIT License. See the LICENSE file for details.
Authors
Developed by Gerhard Venter.




