Stellenbosch University Digital Image Correlation Library
Project description
SUN-DIC
Stellenbosch University Digital Image Correlation (DIC) Code
SUN-DIC is an open-source Python package for 2D digital image correlation (DIC) developed at Stellenbosch University. It provides both a graphical user interface (GUI) and a Python API for displacement and strain analysis from image sets, making it suitable for both interactive use and research workflows.
Early release notice: SUN-DIC is currently in an early public release phase. Core functionality is available and documented, but the interface and documentation will continue to evolve. Bug reports, suggestions, and feedback are very welcome.
Quick Start
Install with pip
Note: Please see detailed installation instructions for both
pipandcondafurther down in thisREADMEfile.
python3.11 -m venv sundic
source sundic/bin/activate
pip install SUN-DIC
copy-examples
sundic
Documentation
SUN-DIC documentation is currently provided through the following resources:
-
User manual: installation, GUI workflow, and API overview SUN-DIC User Manual (PDF)
-
Example configuration: a fully documented
settings.inifile included with the provided example problem -
Example notebook:
test_sundic.ipynb, copied into your current directory withcopy-examples -
GUI tooltips: GUI options include tooltip descriptions
Publications
- 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.
Key Features
- Fully open-source, using standard Python libraries wherever possible
- Provides both a user-friendly GUI and a programmable API
- Implements the Zero-Mean Normalized Sum of Squared Differences (ZNSSD) correlation criterion
- Uses an advanced starting strategy based on 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 both absolute and relative update strategies for handling multiple image pairs
- Supports rectangular regions of interest (ROI) and custom ROIs defined by a black/white mask
- Automatically ignores subsets with an all-black background, allowing irregularly shaped domains to be handled naturally
- Computes displacements and strains, with multiple plotting and visualization options
- Uses Savitzky-Golay smoothing for strain calculations, with optional displacement smoothing using the same algorithm
- Supports parallel computing for improved performance
- Easy installation via PyPI
Limitations
- Currently supports 2D planar DIC problems only
- A stereo / 3D version is under development
Installation
Although SUN-DIC can be installed without creating a virtual environment, using one is strongly recommended for easier dependency management.
Note The
raylibrary providing the parallel computing functionality is typically not supported for the latest Python releases on Windows. If you run into araydependency issue during installation, please try an older version of Python.
General Steps
-
Create a virtual environment
-
Activate the environment
-
Install the package from PyPI
-
Optionally install Jupyter dependencies
-
Copy the example problem into your current directory using
copy-examplesOptionally you can issue the
copy-examples --manualcommand to also copy the user manual to your current directoryThe example problem includes:
test_sundic.ipynbsettings.iniplanar_images/
These files provide a practical starting point for both the GUI and API workflows.
Using pip
-
Create a virtual environment (e.g.,
sundic):python3.11 -m venv sundic
-
Activate the virtual environment:
Linux / macOS
source sundic/bin/activate
Windows (Command Prompt)
sundic\Scripts\activate
-
Install the base package:
pip install SUN-DIC
-
Optional -- install Jupyter notebook support:
pip install "SUN-DIC[jupyter]"
-
Copy the example problem:
copy-examples
Using conda
-
Create a virtual environment with Python 3.11:
conda create -n sundic python=3.11
-
Activate the environment:
conda activate sundic
-
Install the base package:
pip install SUN-DIC
-
Optional -- install Jupyter notebook support:
pip install "SUN-DIC[jupyter]"
-
Copy the example problem:
copy-examples
Installing Directly from GitHub (Advanced Users)
-
Create and activate a virtual environment using either
piporcondaas described above -
Clone the repository and install the package:
git clone https://github.com/gventer/SUN-DIC.git pip install ./SUN-DIC
-
Optional: install Jupyter notebook support:
pip install "./SUN-DIC[jupyter]"
-
The example problem is available in:
SUN-DIC/sundic/examples
Usage
Make sure the virtual environment where SUN-DIC is installed is active before proceeding.
Running the GUI
-
Launch the GUI from a terminal:
sundic
-
Use the
copy-examplescommand to copy a complete example to your current directory -
In the GUI, use File → Import Settings File to import the example
settings.ini -
Run the example problem from the Analysis panel
-
Perform post-processing using the Results panel
-
Follow the workflow shown on the left-hand side of the GUI
GUI entries include tooltips describing the available options.
Using the API
-
Use the
copy-examplescommand to copy a complete example to your current directory -
Open
test_sundic.ipynbfor a fully worked example -
If needed, install the optional Jupyter dependencies:
pip install "SUN-DIC[jupyter]"
A typical API workflow involves:
- modifying the
settings.inifile - running the DIC analysis
- post-processing the results
Although the provided example uses a Jupyter notebook, the API can also be used in standard Python scripts.
Support and Feedback
If you encounter a bug, have a feature suggestion, or would like to provide feedback, please open an issue on the GitHub repository.
Citation
If you use SUN-DIC in academic work, please cite the publication listed above.
Presentations
- 2025-04-17 -- MOD Research Group Meeting - Overview of 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 through the Stellenbosch University Library.
- Interpolator: uses
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.
Author
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.30.tar.gz.
File metadata
- Download URL: sun_dic-0.0.30.tar.gz
- Upload date:
- Size: 8.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67239f4d5829fb0dc917da17855a9ddab1687c1cc53fefd4cd281e09d243e944
|
|
| MD5 |
6c3a802d720e1eafefe350bc8fcbd1c8
|
|
| BLAKE2b-256 |
c0f8ea21b91b863e9b6bc89e6fc4ea3d123ae2c3b15e4d91f856c7b67e43aa6b
|
Provenance
The following attestation bundles were made for sun_dic-0.0.30.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.30.tar.gz -
Subject digest:
67239f4d5829fb0dc917da17855a9ddab1687c1cc53fefd4cd281e09d243e944 - Sigstore transparency entry: 1733032093
- Sigstore integration time:
-
Permalink:
gventer/SUN-DIC@d1c929c41ac944edef8ffff4d761b14132231f29 -
Branch / Tag:
refs/tags/0.0.30 - Owner: https://github.com/gventer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@d1c929c41ac944edef8ffff4d761b14132231f29 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sun_dic-0.0.30-py3-none-any.whl.
File metadata
- Download URL: sun_dic-0.0.30-py3-none-any.whl
- Upload date:
- Size: 8.5 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 |
80d1fb8022969c052dbcb502fbab7b4bbb8a476d429b07d883b520cabcbee514
|
|
| MD5 |
6a9561735f1b2967b3fdc6bd3e51beac
|
|
| BLAKE2b-256 |
98be8535f17db3ae00bcb8449c2e8fed333d99d3f5a9a21652aaf1a8f7ab1519
|
Provenance
The following attestation bundles were made for sun_dic-0.0.30-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.30-py3-none-any.whl -
Subject digest:
80d1fb8022969c052dbcb502fbab7b4bbb8a476d429b07d883b520cabcbee514 - Sigstore transparency entry: 1733032100
- Sigstore integration time:
-
Permalink:
gventer/SUN-DIC@d1c929c41ac944edef8ffff4d761b14132231f29 -
Branch / Tag:
refs/tags/0.0.30 - Owner: https://github.com/gventer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@d1c929c41ac944edef8ffff4d761b14132231f29 -
Trigger Event:
push
-
Statement type: