Skip to main content

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

  1. Download PDF 2025-07-01 -- Venter, Gerhard and Neaves, Melody, SUN-DIC: A Python-Based Open-Source Software Tool for Digital Image Correlation. Pre-print available at SSRN: https://ssrn.com/abstract=5333350 or http://dx.doi.org/10.2139/ssrn.5333350

Presentations

  1. Download PDF 2025-04-17 -- MOD Research Group Meeting - Overview of SUN-DIC

Limitations

  1. Currently supports only 2D planar problems (a stereo version is under development).
  2. 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.
  3. Limited documentation. Please see the settings.ini file for complete documentation on the options and the test_sundic.ipynb file 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 the copy-examples command after installation. Please see below.

Key Features

  1. Fully open-source, utilizing standard Python libraries wherever possible.
  2. Offers both a user-friendly GUI and an API for interaction.
  3. Implements the Zero-Mean Normalized Sum of Squared Differences (ZNSSD) correlation criterion.
  4. Features an advanced starting strategy using the AKAZE feature detection algorithm for initial guess generation.
  5. Supports both linear (affine) and quadratic shape functions.
  6. Includes Inverse Compositional Gauss-Newton (IC-GN) and Inverse Compositional Levenberg-Marquardt (IC-LM) solvers.
  7. Provides absolute and relative update strategies for handling multiple image pairs.
  8. Computes displacements and strains.
  9. Utilizes Savitzky-Golay smoothing for strain calculations. Displacements can also be smoothed using the same algorithm.
  10. Supports parallel computing for improved performance.
  11. 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

  1. Create a virtual environment.
  2. Activate the virtual environment.
  3. Install the package from PyPI.
  4. 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.ipynb
    • settings.ini
    • planar_images folder These files provide practical starting point for using both the API or GUI.

Using pip

  1. Create a virtual environment (e.g., sundic):
    python3.11 -m venv sundic
    
  2. Activate the virtual environment:
    source sundic/bin/activate
    
  3. Install the package:
    pip install SUN-DIC
    
  4. Copy the example problem:
    copy-examples
    

Using conda

  1. Create a virtual environment (e.g., sundic) with Python pre-installed:
    conda create -n sundic python=3.11
    
  2. Activate the virtual environment:
    conda activate sundic
    
  3. Install the package:
    pip install SUN-DIC
    
  4. . Copy the example problem:
    copy-examples
    

Installing Directly from GitHub (Advanced users only)

  1. Create and activate a virtual environment using either pip or conda as outlined above.
  2. Clone the repository and install the package:
    git clone https://github.com/gventer/SUN-DIC.git
    pip install ./SUN-DIC
    
  3. The example problem can then be found in the SUN-DIC/sundic/examples directory.

Usage

Make sure the virtual environment where SUN-DIC is installed is active before proceeding.

Starting the GUI

  1. Type sundic in the terminal to launch the GUI.
  2. Use the copy-examples command to copy a complete working example to the current working directory.
  3. Follow the workflow outlined on the left-hand side of the GUI. Hovering over any entry provides helpful tooltips.


Using the API

  1. Use the copy-examples command to copy a complete working example to the current working directory.
  2. Open the test_sundic.ipynb Jupyter Notebook for a detailed working example.
  3. The typical workflow involves:
    • Modifying the settings.ini file.
    • Running the DIC analysis.
    • Post-processing the results.
  4. While the example uses a Jupyter Notebook, the API can also be used in standard Python .py scripts.

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_interp by David Stein, licensed under Apache 2.0. Repository: fast_interp.
  • Smoothing Algorithm: Implements the 2D Savitzky-Golay algorithm from the SciPy Cookbook.
  • GUI Development: Developed by Elijah Stockhall.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Authors

Developed by Gerhard Venter.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sun_dic-0.0.21.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sun_dic-0.0.21-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file sun_dic-0.0.21.tar.gz.

File metadata

  • Download URL: sun_dic-0.0.21.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sun_dic-0.0.21.tar.gz
Algorithm Hash digest
SHA256 2a39ebcca26615059660c0d9c3fe5945f8c6de0ea6b729e255f7616110c602aa
MD5 b7fbecd4b2b0bf948223f29214cd964e
BLAKE2b-256 85ac92d10634e4be958bae29ab5b78ddff3707ae955114c845c70ce0341a73e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for sun_dic-0.0.21.tar.gz:

Publisher: pypi.yml on gventer/SUN-DIC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sun_dic-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: sun_dic-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sun_dic-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 a26b19f321905b076c46db5001d2e13047fb9634e3caf55c6e28f6013c567ad6
MD5 ecef5c6b6ed7124c23480d097e951c3a
BLAKE2b-256 1fb4d6d90a3c24f44a5c3e9a1632ba2035a82cee7b0b600e535fa104fdef7640

See more details on using hashes here.

Provenance

The following attestation bundles were made for sun_dic-0.0.21-py3-none-any.whl:

Publisher: pypi.yml on gventer/SUN-DIC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page