Skip to main content

Config-driven calibration-free multi-view DIC workflow.

Project description

PyMultiDIC

PyMultiDIC is a Python-first multi-view digital image correlation workflow. It wraps the full solving process as public Python API calls under pymultidic.<function_name> while keeping native C++ acceleration for the expensive Ncorr-style 2D DIC and 3D reconstruction stages.

The project can be used in two ways:

  • Install the released package with pip install pymultidic and call the API.
  • Build the repository locally, including the native C++ components under native/, then run the same API from source.

The full user manual is available here: docs/pymultidic_usage_en.pdf.

Example Results

The bundled case/CylinderDIC example was solved through the Python API. A small set of representative result files is stored under docs/results/cylinderdic.

3D morphology cloud map

3D morphology cloud map

Total 3D displacement cloud map

Total displacement cloud map

Displacement component cloud maps

Ux Uy Uz
Ux displacement Uy displacement Uz displacement

Additional copied outputs:

For this example, the 3D reconstruction report records 3,695 valid 3D points after 3D outlier cleaning and uses the native_recon3d backend.

Install From PyPI

pip install pymultidic

Then call the package from Python:

import pymultidic

config = pymultidic.load_config("configs/MDIC.yaml")
report = pymultidic.run_pipeline(
    config,
    steps=["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"],
)

You can also call the API without a YAML file. In direct-input mode, case_root is required and the remaining paths and numerical parameters use PyMultiDIC defaults unless overridden:

import pymultidic

report = pymultidic.run_pipeline(
    case_root="case/CylinderDIC",
    project_name="CylinderDIC",
    steps=["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"],
    subset_radius=25,
    subset_spacing=6,
    min_corrcoef=0.6,
)

If an MDICConfig object is supplied, it has priority and later keyword arguments are ignored:

config = pymultidic.load_config("configs/MDIC.yaml")
pymultidic.run_dic2d(config, subset_radius=99)  # uses the config value

Local Native C++ Build

Use this route when developing the repository, changing files under native/, or validating native builds before publishing wheels. The top-level native/CMakeLists.txt builds the native components in one configure/build pass:

  • native_ncorr / libnative_ncorr.a
  • ncorr_cli
  • native_recon3d pybind11 extension

WSL / Linux example:

sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build python3-dev python3-pip
python3 -m pip install -U pybind11 scikit-build-core

cmake -S native -B build/wsl-native -G Ninja \
  -DPYBIND11_FINDPYTHON=ON \
  -DPython_EXECUTABLE=/usr/bin/python3 \
  -Dpybind11_DIR=$(python3 -m pybind11 --cmakedir)
cmake --build build/wsl-native

Expected WSL/Linux outputs:

build/wsl-native/ncorr/libnative_ncorr.a
build/wsl-native/ncorr/ncorr_cli
build/wsl-native/recon3d/native_recon3d*.so

Windows example from a Developer PowerShell with CMake and Ninja available:

python -m pip install -U pybind11 scikit-build-core cmake ninja
cmake -S native -B build/windows-native -G Ninja -DPYBIND11_FINDPYTHON=ON
cmake --build build/windows-native

Expected Windows outputs include:

build/windows-native/ncorr/ncorr_cli.exe
build/windows-native/recon3d/native_recon3d*.pyd

After the native build, install the Python package locally:

python -m pip install -e .
python run.py --config configs/MDIC.yaml

Public API

Core API functions:

  • pymultidic.load_config(config_path, workspace_root=None)
  • pymultidic.build_config(config=None, *, case_root=None, ...)
  • pymultidic.validate_project(config=None, **kwargs)
  • pymultidic.run_validate(config=None, **kwargs)
  • pymultidic.run_sfm(config=None, **kwargs)
  • pymultidic.run_scale(config=None, **kwargs)
  • pymultidic.run_mask(config=None, **kwargs)
  • pymultidic.run_dic2d(config=None, **kwargs)
  • pymultidic.run_recon3d(config=None, **kwargs)
  • pymultidic.run_visualize3d(config=None, **kwargs)
  • pymultidic.run_step(config_or_step=None, step=None, **kwargs)
  • pymultidic.run_pipeline(config=None, steps=None, stop_on_error=True, **kwargs)

See docs/pymultidic_usage_en.pdf for the full function-by-function parameter reference, return values, and examples.

Workflow

flowchart TD
    A["Case folder<br/>camera images and calibration images"] --> B["validate<br/>check inputs and output folders"]
    B --> C["sfm<br/>camera geometry, sparse points, observations"]
    C --> D["scale<br/>checkerboard world-scale correction"]
    C --> E["mask<br/>ROI masks from user masks or automatic logic"]
    D --> F["dic2d<br/>native ncorr per-camera 2D DIC"]
    E --> F
    F --> G["recon3d<br/>triangulated 3D displacement and pair surfaces"]
    G --> H["visualize3d<br/>morphology and displacement cloud maps"]
    H --> I["reports, npz, ply, png results"]

Manual step-by-step control:

import pymultidic

config = pymultidic.build_config(
    case_root="case/CylinderDIC",
    project_name="CylinderDIC",
    subset_radius=25,
    subset_spacing=6,
    min_corrcoef=0.6,
)

for step in ["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"]:
    report = pymultidic.run_step(config, step)
    if not report.get("ok"):
        raise RuntimeError(f"{step} failed: {report}")

Output Layout

By default, results are written under <case_root>/<output_root>. For the bundled example this is case/CylinderDIC/results.

Common output folders:

  • logs/: JSON reports for each step and the full pipeline.
  • sfm/colmap/: camera models, sparse points, observations, and COLMAP files.
  • scale/: checkerboard scale correction outputs.
  • masks/: ROI masks, overlays, and debug images.
  • dic2d/: per-camera/per-frame DIC2D .npz outputs.
  • recon3d/: global 3D reconstruction .npz and .ply files.
  • recon3d/pairs/<frame>/: MultiDIC-style pair surface meshes.
  • recon3d/post/<frame>/: pair-surface post-processing results.
  • figures/: 3D visualization outputs.
  • figures/surface_clouds/: morphology, total displacement, and Ux/Uy/Uz cloud maps.

Programmatic access to visualization outputs:

vis_report = pymultidic.run_visualize3d(config)
outputs = vis_report["outputs"]

print(outputs["surface_cloud_morphology"])
print(outputs["surface_cloud_displacement_total"])
print(outputs["surface_cloud_displacement_ux"])
print(outputs["surface_cloud_displacement_uy"])
print(outputs["surface_cloud_displacement_uz"])

Reference Source

reference_code_lib/ is kept as local reference source code. The formal PyMultiDIC implementation lives in the repository root, the pymultidic/ package, the multidic/ implementation modules, and the native C++ projects under native/.

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

pymultidic-0.1.3.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

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

pymultidic-0.1.3-cp313-cp313-win_amd64.whl (217.8 kB view details)

Uploaded CPython 3.13Windows x86-64

pymultidic-0.1.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (216.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymultidic-0.1.3-cp313-cp313-macosx_11_0_arm64.whl (192.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pymultidic-0.1.3-cp312-cp312-win_amd64.whl (217.7 kB view details)

Uploaded CPython 3.12Windows x86-64

pymultidic-0.1.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (216.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymultidic-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (191.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pymultidic-0.1.3-cp311-cp311-win_amd64.whl (215.2 kB view details)

Uploaded CPython 3.11Windows x86-64

pymultidic-0.1.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (216.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymultidic-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (190.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pymultidic-0.1.3-cp310-cp310-win_amd64.whl (214.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pymultidic-0.1.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (216.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymultidic-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (188.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pymultidic-0.1.3.tar.gz.

File metadata

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

File hashes

Hashes for pymultidic-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f3d22fb3186df8e6461d6ca6e399662e3bef854241d9c4b40f0fdc011d142d39
MD5 8a03581bda5a0a2faad5102778f96596
BLAKE2b-256 01faf60b3aca4a44619670e4a28cc12684fd639e6bd53c6492bd8218b0e1521b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3.tar.gz:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pymultidic-0.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 217.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymultidic-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8648c2158dec7e20b10809695c06fb037651defa6310bf906a27c06ef54dc337
MD5 b96874be066e53ce51ed1dca5d1ce78d
BLAKE2b-256 7c76ff63b54a903b5987667d4e617c31496efc39cbc890ca442f0a39b2a087ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 99f482501f4ab5e8ac2250c1e0a3ad7df67ff037df18234735e8172cd6bf5207
MD5 feed3af557680fce57ceb04d68004be9
BLAKE2b-256 e7f13e5ff828c1ff90814b8b6cef121f1879754088a0d1113d99a66b45746c8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 46ba3706c8038c64c331299644555a0a7322d07bf77fe4648290f397b6caff9b
MD5 bc280dbb5cae0a3598725a7061a6cd73
BLAKE2b-256 0dfabb48ea6c3593a1ddcb7aca9fe319ec6fada63c285214107107a30e4a83a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pymultidic-0.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 217.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymultidic-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4b476ec7118f0c27e3f65bdd445bb26ed1c92a0c3a391a78948fe35e6e461864
MD5 43543495dfd2f07d1b6d4fd467209743
BLAKE2b-256 86b438716c133964f64c9b0976a8f2eacf8cd45a6d701ad999c0eb042c35b68c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 349411e0d0ff2c52c809186a09877b148a6058f0d8d94e61e55e3509a419eec8
MD5 4d06210ad5348322bcbff8bd56f01b00
BLAKE2b-256 eea135d3c67a7a21142e2cdfe4bac064bb95dfd637e109d9cad2bd485115bc3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1446edb5d5573cac137e9c15d295c886b6d598e3afeb79862d8494692dd2963e
MD5 1a0a9f353eb569fb46d69d107930e159
BLAKE2b-256 b0122908a44761be34696169cbe447d972b407680b88708592cf5e325d729645

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pymultidic-0.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 215.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymultidic-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bf0989dbaf8553f441bc2281602517ebe32998702133c81117f6d3f331c9078d
MD5 4f089e652781b94a92663165bc01c315
BLAKE2b-256 da82111526452c840e5ccc0096573cef1841d219e2aeb5c46cad32d51d992f1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7adc04ae3f4acc496cfa6f4f1ecdc6fa6633b9e18a0777d2bb0dae8ac01f53a
MD5 2e6b50e92ab3256a06a3604e11fdd240
BLAKE2b-256 f1b862e3ef618b275af857cd1e5151e9d439b112f40a9fc3e24d68e3396c5a95

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfa54c2958780362145588d55286f33211ff1378f6f0476e80da829e661e53cc
MD5 50a478ca2d74dd35811954473d08f33d
BLAKE2b-256 ea3e91aff35d9258d219efe1762aba3fc7bab210fca653e35e1a75e7cdf00871

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pymultidic-0.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 214.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymultidic-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 391b26698e0dbbde20b7167aea017a5d62e74c508af20f83b24539d4716675a0
MD5 6b015ef411a7da3b9fa9fc869dbd3d31
BLAKE2b-256 877a31a4c74dd14743a7f4f7258861f2425e8396c500a63ee2f6a01d5a01381a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 13a43340dd3236a33024317be7daa6e14a7168157d4eefa61220ec3a8a221ebe
MD5 27da8eb11cfd3c53b58f1b175f170277
BLAKE2b-256 85fbaa752a0cc7e05b34b70ab5aff75a03fa9bd156875b19a9865050dc811221

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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 pymultidic-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pymultidic-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fcda7fd9df9760ae54640d93e62a2a5177c21f5007d4cfb680b90fd2f5ea22a8
MD5 e03127d9b921947711ae2e888ca88d70
BLAKE2b-256 ae8d953ae1eedc40236962de7c91f8a73afc71ceb9dde63bdbc342443528c39e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymultidic-0.1.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on lbd-hfut/Multi-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