Stellenbosch University Digital Image Correlation Library
Project description
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).
- Limited documentation. Please see the provided
settings.inifile for a complete description of all the options or use tooltip comments in the GUI for a description of the options. 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.
- Users can specify rectangular regions of iterest (ROI) and/or make use of a black/white mask to define a custom ROI. White areas are analysed while black areas are ignored. In addition, subsets with an all-black background (based on a user-defined threshold) are automatically ignored thus allowing the code to handle irregularly shaped domains automatically.
- Computes displacements and strains and provides several graphing options to investigate the results.
- 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.
- If you want to use the example Jupyter notebook, install the optional
jupyterdependencies. - 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 a 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 base package:
pip install SUN-DIC -
Optional: install Jupyter notebook support if you want to use the Jupyter example:
pip install "SUN-DIC[jupyter]" -
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 base package:
pip install SUN-DIC -
Optional: install Jupyter notebook support if you want to use the Jupyter example:
pip install "SUN-DIC[jupyter]" -
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 base package:
git clone https://github.com/gventer/SUN-DIC.git pip install ./SUN-DIC -
Optional: install Jupyter notebook support if you want to use the Jupyter example
pip install "./SUN-DIC[jupyter]" -
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. - To use the provided example problem in the GUI, make use of the
Import Settings Fileoption in theFilemenu of the GUI to import thesettings.inifile that comes with the example problem. This will setup the example problem in the GUI so that it can be run from theAnalysiswindow. - 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. This requires the optional Jupyter notebook dependencies to be installed with:pip install "SUN-DIC[jupyter]" - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sun_dic-0.0.28.tar.gz.
File metadata
- Download URL: sun_dic-0.0.28.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9efb0d9dfe4d8541f4932f36dda2fa5e98450da421f2854d43f4b3173cc4a151
|
|
| MD5 |
8529624c7972ade524e87a8bdab4bff7
|
|
| BLAKE2b-256 |
3caf264fb8719cb52ce4f9f39844637d3d2fd2328a96d896b678236d941a5b64
|
Provenance
The following attestation bundles were made for sun_dic-0.0.28.tar.gz:
Publisher:
pypi.yml on gventer/SUN-DIC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sun_dic-0.0.28.tar.gz -
Subject digest:
9efb0d9dfe4d8541f4932f36dda2fa5e98450da421f2854d43f4b3173cc4a151 - Sigstore transparency entry: 1569450279
- Sigstore integration time:
-
Permalink:
gventer/SUN-DIC@065cf28089ac011a310aef67e2076d6b6c368cc1 -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/gventer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@065cf28089ac011a310aef67e2076d6b6c368cc1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sun_dic-0.0.28-py3-none-any.whl.
File metadata
- Download URL: sun_dic-0.0.28-py3-none-any.whl
- Upload date:
- Size: 4.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
393821baa5f4aa1c798bdb959910e8ffeaf3474d8fe70385a0eb6b7758f3824d
|
|
| MD5 |
7b57372b89c825f060013599aadb0063
|
|
| BLAKE2b-256 |
f2b5ff92108f7e60b2fc8118e119488824143e808732032f452a90c5e9d3cbee
|
Provenance
The following attestation bundles were made for sun_dic-0.0.28-py3-none-any.whl:
Publisher:
pypi.yml on gventer/SUN-DIC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sun_dic-0.0.28-py3-none-any.whl -
Subject digest:
393821baa5f4aa1c798bdb959910e8ffeaf3474d8fe70385a0eb6b7758f3824d - Sigstore transparency entry: 1569450299
- Sigstore integration time:
-
Permalink:
gventer/SUN-DIC@065cf28089ac011a310aef67e2076d6b6c368cc1 -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/gventer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@065cf28089ac011a310aef67e2076d6b6c368cc1 -
Trigger Event:
push
-
Statement type: