pymultidic 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymultidic-0.1.3/.github/workflows/wheels.yml +109 -0
- pymultidic-0.1.3/.gitignore +229 -0
- pymultidic-0.1.3/CMakeLists.txt +5 -0
- pymultidic-0.1.3/LICENSE +21 -0
- pymultidic-0.1.3/PKG-INFO +259 -0
- pymultidic-0.1.3/README.md +235 -0
- pymultidic-0.1.3/configs/MDIC.yaml +167 -0
- pymultidic-0.1.3/docs/pymultidic_usage_en.pdf +232 -0
- pymultidic-0.1.3/docs/results/cylinderdic/pipeline_report.json +200 -0
- pymultidic-0.1.3/docs/results/cylinderdic/recon3d_002.ply +3708 -0
- pymultidic-0.1.3/docs/results/cylinderdic/recon3d_report.json +570 -0
- pymultidic-0.1.3/docs/results/cylinderdic/surface_cloud_displacement_total.png +0 -0
- pymultidic-0.1.3/docs/results/cylinderdic/surface_cloud_displacement_ux.png +0 -0
- pymultidic-0.1.3/docs/results/cylinderdic/surface_cloud_displacement_uy.png +0 -0
- pymultidic-0.1.3/docs/results/cylinderdic/surface_cloud_displacement_uz.png +0 -0
- pymultidic-0.1.3/docs/results/cylinderdic/surface_cloud_morphology.png +0 -0
- pymultidic-0.1.3/environment.yml +18 -0
- pymultidic-0.1.3/multidic/__init__.py +3 -0
- pymultidic-0.1.3/multidic/__main__.py +5 -0
- pymultidic-0.1.3/multidic/cli.py +5 -0
- pymultidic-0.1.3/multidic/colmap_backends/__init__.py +13 -0
- pymultidic-0.1.3/multidic/colmap_backends/base.py +26 -0
- pymultidic-0.1.3/multidic/colmap_backends/pycolmap_backend.py +731 -0
- pymultidic-0.1.3/multidic/config.py +160 -0
- pymultidic-0.1.3/multidic/dic2d.py +532 -0
- pymultidic-0.1.3/multidic/image_io.py +57 -0
- pymultidic-0.1.3/multidic/mask.py +566 -0
- pymultidic-0.1.3/multidic/recon3d.py +1687 -0
- pymultidic-0.1.3/multidic/scale.py +645 -0
- pymultidic-0.1.3/multidic/sfm.py +136 -0
- pymultidic-0.1.3/multidic/validate.py +190 -0
- pymultidic-0.1.3/multidic/visualization.py +663 -0
- pymultidic-0.1.3/native/CMakeLists.txt +10 -0
- pymultidic-0.1.3/native/ncorr/.gitkeep +1 -0
- pymultidic-0.1.3/native/ncorr/CMakeLists.txt +23 -0
- pymultidic-0.1.3/native/ncorr/Makefile +29 -0
- pymultidic-0.1.3/native/ncorr/README.md +72 -0
- pymultidic-0.1.3/native/ncorr/include/ncorr_api.h +149 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_alg_calcseeds.cpp +1074 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_alg_rgdic.cpp +1020 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_datatypes.cpp +863 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_datatypes.h +123 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_lib.cpp +1110 -0
- pymultidic-0.1.3/native/ncorr/legacy/ncorr_lib.h +92 -0
- pymultidic-0.1.3/native/ncorr/legacy/standard_datatypes.cpp +252 -0
- pymultidic-0.1.3/native/ncorr/legacy/standard_datatypes.h +105 -0
- pymultidic-0.1.3/native/ncorr/src/ncorr_api.cpp +1137 -0
- pymultidic-0.1.3/native/ncorr/tools/ncorr_cli.cpp +235 -0
- pymultidic-0.1.3/native/recon3d/CMakeLists.txt +17 -0
- pymultidic-0.1.3/native/recon3d/README.md +64 -0
- pymultidic-0.1.3/native/recon3d/src/recon3d_bindings.cpp +988 -0
- pymultidic-0.1.3/pymultidic/__init__.py +38 -0
- pymultidic-0.1.3/pymultidic/__main__.py +6 -0
- pymultidic-0.1.3/pymultidic/api.py +462 -0
- pymultidic-0.1.3/pymultidic/cli.py +44 -0
- pymultidic-0.1.3/pyproject.toml +57 -0
- pymultidic-0.1.3/run.py +107 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
name: Build wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- "v*"
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- ".github/workflows/wheels.yml"
|
|
11
|
+
- "pyproject.toml"
|
|
12
|
+
- "CMakeLists.txt"
|
|
13
|
+
- "native/**"
|
|
14
|
+
- "multidic/**"
|
|
15
|
+
- "pymultidic/**"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build-wheels:
|
|
19
|
+
name: Wheels on ${{ matrix.os }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
include:
|
|
25
|
+
- os: ubuntu-latest
|
|
26
|
+
cibw_archs: x86_64
|
|
27
|
+
- os: windows-latest
|
|
28
|
+
cibw_archs: AMD64
|
|
29
|
+
- os: macos-14
|
|
30
|
+
cibw_archs: arm64
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: "3.12"
|
|
38
|
+
|
|
39
|
+
- name: Build wheels
|
|
40
|
+
uses: pypa/cibuildwheel@v2.23.3
|
|
41
|
+
env:
|
|
42
|
+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
|
|
43
|
+
CIBW_ARCHS: "${{ matrix.cibw_archs }}"
|
|
44
|
+
CIBW_SKIP: "*-musllinux_* *-win32"
|
|
45
|
+
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
|
|
46
|
+
CIBW_TEST_COMMAND: "python -c \"import pymultidic, native_recon3d; print(pymultidic.__version__); print(native_recon3d.__doc__)\""
|
|
47
|
+
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: wheels-${{ matrix.os }}
|
|
51
|
+
path: wheelhouse/*.whl
|
|
52
|
+
|
|
53
|
+
build-sdist:
|
|
54
|
+
name: Source distribution
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
- uses: actions/setup-python@v5
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.12"
|
|
63
|
+
|
|
64
|
+
- name: Build sdist
|
|
65
|
+
run: |
|
|
66
|
+
python -m pip install --upgrade build
|
|
67
|
+
python -m build --sdist
|
|
68
|
+
|
|
69
|
+
- uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: sdist
|
|
72
|
+
path: dist/*.tar.gz
|
|
73
|
+
|
|
74
|
+
github-release:
|
|
75
|
+
name: GitHub Release
|
|
76
|
+
needs: [build-wheels, build-sdist]
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
79
|
+
permissions:
|
|
80
|
+
contents: write
|
|
81
|
+
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/download-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
path: release-dist
|
|
86
|
+
merge-multiple: true
|
|
87
|
+
|
|
88
|
+
- name: Create GitHub Release
|
|
89
|
+
uses: softprops/action-gh-release@v2
|
|
90
|
+
with:
|
|
91
|
+
files: release-dist/*
|
|
92
|
+
|
|
93
|
+
publish-pypi:
|
|
94
|
+
name: Publish to PyPI
|
|
95
|
+
needs: [build-wheels, build-sdist]
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
98
|
+
environment: pypi
|
|
99
|
+
permissions:
|
|
100
|
+
id-token: write
|
|
101
|
+
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/download-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
path: dist
|
|
106
|
+
merge-multiple: true
|
|
107
|
+
|
|
108
|
+
- name: Publish package distributions to PyPI
|
|
109
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# Reference code library
|
|
221
|
+
reference_code_lib/
|
|
222
|
+
|
|
223
|
+
# Project-generated outputs
|
|
224
|
+
case/**/result/
|
|
225
|
+
case/**/results/
|
|
226
|
+
case/**/ground_truth/
|
|
227
|
+
|
|
228
|
+
# Native build outputs
|
|
229
|
+
native/**/build*/
|
pymultidic-0.1.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 LeeBDa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: pymultidic
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Config-driven calibration-free multi-view DIC workflow.
|
|
5
|
+
Author-Email: LeeBDa <liboda1101@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/lbd-hfut/Multi-DIC
|
|
7
|
+
Project-URL: Repository, https://github.com/lbd-hfut/Multi-DIC
|
|
8
|
+
Project-URL: Issues, https://github.com/lbd-hfut/Multi-DIC/issues
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: matplotlib>=3.8
|
|
11
|
+
Requires-Dist: numpy>=1.26
|
|
12
|
+
Requires-Dist: opencv-python>=4.8
|
|
13
|
+
Requires-Dist: PyYAML>=6.0
|
|
14
|
+
Requires-Dist: pycolmap==4.1.0
|
|
15
|
+
Requires-Dist: scipy>=1.11
|
|
16
|
+
Provides-Extra: build
|
|
17
|
+
Requires-Dist: cmake>=3.20; extra == "build"
|
|
18
|
+
Requires-Dist: cibuildwheel>=2.20; extra == "build"
|
|
19
|
+
Requires-Dist: ninja>=1.11; extra == "build"
|
|
20
|
+
Requires-Dist: pybind11>=2.11; extra == "build"
|
|
21
|
+
Requires-Dist: twine>=5.0; extra == "build"
|
|
22
|
+
Requires-Dist: build>=1.2; extra == "build"
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# PyMultiDIC
|
|
26
|
+
|
|
27
|
+
PyMultiDIC is a Python-first multi-view digital image correlation workflow. It
|
|
28
|
+
wraps the full solving process as public Python API calls under
|
|
29
|
+
`pymultidic.<function_name>` while keeping native C++ acceleration for the
|
|
30
|
+
expensive Ncorr-style 2D DIC and 3D reconstruction stages.
|
|
31
|
+
|
|
32
|
+
The project can be used in two ways:
|
|
33
|
+
|
|
34
|
+
- Install the released package with `pip install pymultidic` and call the API.
|
|
35
|
+
- Build the repository locally, including the native C++ components under
|
|
36
|
+
`native/`, then run the same API from source.
|
|
37
|
+
|
|
38
|
+
The full user manual is available here:
|
|
39
|
+
[docs/pymultidic_usage_en.pdf](docs/pymultidic_usage_en.pdf).
|
|
40
|
+
|
|
41
|
+
## Example Results
|
|
42
|
+
|
|
43
|
+
The bundled `case/CylinderDIC` example was solved through the Python API. A
|
|
44
|
+
small set of representative result files is stored under
|
|
45
|
+
[docs/results/cylinderdic](docs/results/cylinderdic).
|
|
46
|
+
|
|
47
|
+
**3D morphology cloud map**
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
**Total 3D displacement cloud map**
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
**Displacement component cloud maps**
|
|
56
|
+
|
|
57
|
+
| Ux | Uy | Uz |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
|  |  |  |
|
|
60
|
+
|
|
61
|
+
Additional copied outputs:
|
|
62
|
+
|
|
63
|
+
- [docs/results/cylinderdic/recon3d_002.ply](docs/results/cylinderdic/recon3d_002.ply)
|
|
64
|
+
- [docs/results/cylinderdic/recon3d_report.json](docs/results/cylinderdic/recon3d_report.json)
|
|
65
|
+
- [docs/results/cylinderdic/pipeline_report.json](docs/results/cylinderdic/pipeline_report.json)
|
|
66
|
+
|
|
67
|
+
For this example, the 3D reconstruction report records 3,695 valid 3D points
|
|
68
|
+
after 3D outlier cleaning and uses the `native_recon3d` backend.
|
|
69
|
+
|
|
70
|
+
## Install From PyPI
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install pymultidic
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then call the package from Python:
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
import pymultidic
|
|
80
|
+
|
|
81
|
+
config = pymultidic.load_config("configs/MDIC.yaml")
|
|
82
|
+
report = pymultidic.run_pipeline(
|
|
83
|
+
config,
|
|
84
|
+
steps=["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"],
|
|
85
|
+
)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
You can also call the API without a YAML file. In direct-input mode,
|
|
89
|
+
`case_root` is required and the remaining paths and numerical parameters use
|
|
90
|
+
PyMultiDIC defaults unless overridden:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
import pymultidic
|
|
94
|
+
|
|
95
|
+
report = pymultidic.run_pipeline(
|
|
96
|
+
case_root="case/CylinderDIC",
|
|
97
|
+
project_name="CylinderDIC",
|
|
98
|
+
steps=["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"],
|
|
99
|
+
subset_radius=25,
|
|
100
|
+
subset_spacing=6,
|
|
101
|
+
min_corrcoef=0.6,
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If an `MDICConfig` object is supplied, it has priority and later keyword
|
|
106
|
+
arguments are ignored:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
config = pymultidic.load_config("configs/MDIC.yaml")
|
|
110
|
+
pymultidic.run_dic2d(config, subset_radius=99) # uses the config value
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Local Native C++ Build
|
|
114
|
+
|
|
115
|
+
Use this route when developing the repository, changing files under `native/`,
|
|
116
|
+
or validating native builds before publishing wheels. The top-level
|
|
117
|
+
[native/CMakeLists.txt](native/CMakeLists.txt) builds the native components in
|
|
118
|
+
one configure/build pass:
|
|
119
|
+
|
|
120
|
+
- `native_ncorr` / `libnative_ncorr.a`
|
|
121
|
+
- `ncorr_cli`
|
|
122
|
+
- `native_recon3d` pybind11 extension
|
|
123
|
+
|
|
124
|
+
WSL / Linux example:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
sudo apt-get update
|
|
128
|
+
sudo apt-get install -y build-essential cmake ninja-build python3-dev python3-pip
|
|
129
|
+
python3 -m pip install -U pybind11 scikit-build-core
|
|
130
|
+
|
|
131
|
+
cmake -S native -B build/wsl-native -G Ninja \
|
|
132
|
+
-DPYBIND11_FINDPYTHON=ON \
|
|
133
|
+
-DPython_EXECUTABLE=/usr/bin/python3 \
|
|
134
|
+
-Dpybind11_DIR=$(python3 -m pybind11 --cmakedir)
|
|
135
|
+
cmake --build build/wsl-native
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Expected WSL/Linux outputs:
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
build/wsl-native/ncorr/libnative_ncorr.a
|
|
142
|
+
build/wsl-native/ncorr/ncorr_cli
|
|
143
|
+
build/wsl-native/recon3d/native_recon3d*.so
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Windows example from a Developer PowerShell with CMake and Ninja available:
|
|
147
|
+
|
|
148
|
+
```powershell
|
|
149
|
+
python -m pip install -U pybind11 scikit-build-core cmake ninja
|
|
150
|
+
cmake -S native -B build/windows-native -G Ninja -DPYBIND11_FINDPYTHON=ON
|
|
151
|
+
cmake --build build/windows-native
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Expected Windows outputs include:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
build/windows-native/ncorr/ncorr_cli.exe
|
|
158
|
+
build/windows-native/recon3d/native_recon3d*.pyd
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
After the native build, install the Python package locally:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
python -m pip install -e .
|
|
165
|
+
python run.py --config configs/MDIC.yaml
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Public API
|
|
169
|
+
|
|
170
|
+
Core API functions:
|
|
171
|
+
|
|
172
|
+
- `pymultidic.load_config(config_path, workspace_root=None)`
|
|
173
|
+
- `pymultidic.build_config(config=None, *, case_root=None, ...)`
|
|
174
|
+
- `pymultidic.validate_project(config=None, **kwargs)`
|
|
175
|
+
- `pymultidic.run_validate(config=None, **kwargs)`
|
|
176
|
+
- `pymultidic.run_sfm(config=None, **kwargs)`
|
|
177
|
+
- `pymultidic.run_scale(config=None, **kwargs)`
|
|
178
|
+
- `pymultidic.run_mask(config=None, **kwargs)`
|
|
179
|
+
- `pymultidic.run_dic2d(config=None, **kwargs)`
|
|
180
|
+
- `pymultidic.run_recon3d(config=None, **kwargs)`
|
|
181
|
+
- `pymultidic.run_visualize3d(config=None, **kwargs)`
|
|
182
|
+
- `pymultidic.run_step(config_or_step=None, step=None, **kwargs)`
|
|
183
|
+
- `pymultidic.run_pipeline(config=None, steps=None, stop_on_error=True, **kwargs)`
|
|
184
|
+
|
|
185
|
+
See [docs/pymultidic_usage_en.pdf](docs/pymultidic_usage_en.pdf) for the full
|
|
186
|
+
function-by-function parameter reference, return values, and examples.
|
|
187
|
+
|
|
188
|
+
## Workflow
|
|
189
|
+
|
|
190
|
+
```mermaid
|
|
191
|
+
flowchart TD
|
|
192
|
+
A["Case folder<br/>camera images and calibration images"] --> B["validate<br/>check inputs and output folders"]
|
|
193
|
+
B --> C["sfm<br/>camera geometry, sparse points, observations"]
|
|
194
|
+
C --> D["scale<br/>checkerboard world-scale correction"]
|
|
195
|
+
C --> E["mask<br/>ROI masks from user masks or automatic logic"]
|
|
196
|
+
D --> F["dic2d<br/>native ncorr per-camera 2D DIC"]
|
|
197
|
+
E --> F
|
|
198
|
+
F --> G["recon3d<br/>triangulated 3D displacement and pair surfaces"]
|
|
199
|
+
G --> H["visualize3d<br/>morphology and displacement cloud maps"]
|
|
200
|
+
H --> I["reports, npz, ply, png results"]
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Manual step-by-step control:
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
import pymultidic
|
|
207
|
+
|
|
208
|
+
config = pymultidic.build_config(
|
|
209
|
+
case_root="case/CylinderDIC",
|
|
210
|
+
project_name="CylinderDIC",
|
|
211
|
+
subset_radius=25,
|
|
212
|
+
subset_spacing=6,
|
|
213
|
+
min_corrcoef=0.6,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
for step in ["validate", "sfm", "scale", "mask", "dic2d", "recon3d", "visualize3d"]:
|
|
217
|
+
report = pymultidic.run_step(config, step)
|
|
218
|
+
if not report.get("ok"):
|
|
219
|
+
raise RuntimeError(f"{step} failed: {report}")
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Output Layout
|
|
223
|
+
|
|
224
|
+
By default, results are written under `<case_root>/<output_root>`. For the
|
|
225
|
+
bundled example this is `case/CylinderDIC/results`.
|
|
226
|
+
|
|
227
|
+
Common output folders:
|
|
228
|
+
|
|
229
|
+
- `logs/`: JSON reports for each step and the full pipeline.
|
|
230
|
+
- `sfm/colmap/`: camera models, sparse points, observations, and COLMAP files.
|
|
231
|
+
- `scale/`: checkerboard scale correction outputs.
|
|
232
|
+
- `masks/`: ROI masks, overlays, and debug images.
|
|
233
|
+
- `dic2d/`: per-camera/per-frame DIC2D `.npz` outputs.
|
|
234
|
+
- `recon3d/`: global 3D reconstruction `.npz` and `.ply` files.
|
|
235
|
+
- `recon3d/pairs/<frame>/`: MultiDIC-style pair surface meshes.
|
|
236
|
+
- `recon3d/post/<frame>/`: pair-surface post-processing results.
|
|
237
|
+
- `figures/`: 3D visualization outputs.
|
|
238
|
+
- `figures/surface_clouds/`: morphology, total displacement, and Ux/Uy/Uz
|
|
239
|
+
cloud maps.
|
|
240
|
+
|
|
241
|
+
Programmatic access to visualization outputs:
|
|
242
|
+
|
|
243
|
+
```python
|
|
244
|
+
vis_report = pymultidic.run_visualize3d(config)
|
|
245
|
+
outputs = vis_report["outputs"]
|
|
246
|
+
|
|
247
|
+
print(outputs["surface_cloud_morphology"])
|
|
248
|
+
print(outputs["surface_cloud_displacement_total"])
|
|
249
|
+
print(outputs["surface_cloud_displacement_ux"])
|
|
250
|
+
print(outputs["surface_cloud_displacement_uy"])
|
|
251
|
+
print(outputs["surface_cloud_displacement_uz"])
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Reference Source
|
|
255
|
+
|
|
256
|
+
`reference_code_lib/` is kept as local reference source code. The formal
|
|
257
|
+
PyMultiDIC implementation lives in the repository root, the `pymultidic/`
|
|
258
|
+
package, the `multidic/` implementation modules, and the native C++ projects
|
|
259
|
+
under `native/`.
|