Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
e28d257
enabling support (in theory) for rectangular subsets. Possible use fo…
JoelPhys Feb 6, 2026
a4988b4
Added a couple of helper functions for optimization parameters and su…
JoelPhys Feb 10, 2026
1d813c3
improvements to scan method readability.
JoelPhys Feb 10, 2026
8a544d1
small bugfix for results when saving on fly.
JoelPhys Feb 10, 2026
8e1d519
interpolator overhaul. prep for stereo.
JoelPhys Feb 13, 2026
2bc6d93
setting up stereo dic. added to cmakelists, updated __init__. Added a…
JoelPhys Feb 16, 2026
9daf6a2
some changes to calib function names. added dataclasses needed for st…
JoelPhys Feb 18, 2026
2e5ae02
updates to calibration to include Fs in optimization. Added dataclass…
JoelPhys Feb 19, 2026
2f3dd2f
initial work in 3d dic function signature and setup.
JoelPhys Feb 19, 2026
c1939f0
Added hamming window. Added zero normalization for single subset. Add…
JoelPhys Feb 24, 2026
4e4c2b7
forgot to add changes to .hpp files related to prev commit.
JoelPhys Feb 25, 2026
947c7d7
streamlined calibstereo.py. Removed waste. Added better checks.
JoelPhys Feb 25, 2026
f0ce104
some small speed improvements to optimizer and interpolator
JoelPhys Feb 26, 2026
239c107
helper functions for RG queue strategy
JoelPhys Feb 27, 2026
1072df2
initial work integrating stereo into main dic engine.
JoelPhys Feb 27, 2026
26f5891
calib improvements
JoelPhys Feb 27, 2026
68ef117
global RG queue helper functions
JoelPhys Mar 4, 2026
e46812f
pyvale logo banner
JoelPhys Mar 4, 2026
6d6e7f8
added stereo flag to dic config struct.
JoelPhys Mar 9, 2026
1af9be2
check for whether roi is all 0s.
JoelPhys Mar 9, 2026
9d5c206
Added struct to handle shape functions.
JoelPhys Mar 10, 2026
17ddb01
factory for interpolator creation.
JoelPhys Mar 10, 2026
f848bec
shape function docstrings.
JoelPhys Mar 10, 2026
4917bd0
rename functions that fill subset to be more intuitive
JoelPhys Mar 10, 2026
b9e9668
optimizer now centres subset at origin. prev was corner at 0,0 in sub…
JoelPhys Mar 10, 2026
bb82cd2
images are ordered l0,l1,...,ln,r0,r1,r2,r3,...rn.
JoelPhys Mar 12, 2026
c443314
only print all deformed image filenames for debug level > 1.
JoelPhys Mar 13, 2026
e9b3d82
interpolator binding.
JoelPhys Mar 16, 2026
fd036d1
overhaul of fourier and windowing code structure.
JoelPhys Mar 18, 2026
11f45f9
func to fill subset using coords of centre.
JoelPhys Mar 23, 2026
996195b
continued updates to subset coordiante system. Updated singlegrid app…
JoelPhys Mar 24, 2026
4a61c20
improvements to rg queue implementation.
JoelPhys Mar 25, 2026
7d2617a
different initialization approach using down sampling.
JoelPhys Mar 26, 2026
2bd9f2a
update to single window fourier search to take in opt.p rather than i…
JoelPhys Mar 30, 2026
c9bbe74
cleanup of fill_from_shape_params
JoelPhys Mar 30, 2026
8e7a7b2
added option to check on convergence and threshold in LM optimizer.
JoelPhys Mar 31, 2026
8478614
changed default damping value in LM optimizer.
JoelPhys Apr 1, 2026
592a4db
fix for subset LM optimizer to work again on SSD
JoelPhys Apr 2, 2026
c7f28f6
functions to compose two shape function transformations into a single…
JoelPhys Apr 2, 2026
35b1805
fix for filling a subset based on centre coords OR shape function params
JoelPhys Apr 2, 2026
a7aafae
fix to prevent fft windowing displacement being off by 0.5 px.
JoelPhys Apr 2, 2026
fad83cf
refactor of main function for incremental and stereo matching strat 3
JoelPhys Apr 2, 2026
847bbd3
update to main stereo matching function
JoelPhys Apr 2, 2026
4704127
updates for stereo helper functions
JoelPhys Apr 2, 2026
a1e4e0f
initial work on functionality to save stereo results.
JoelPhys Apr 2, 2026
a1dd11c
updates to scan functions following changes to coord system. Big upda…
JoelPhys Apr 2, 2026
3a4be91
updated progressbar.
JoelPhys Apr 2, 2026
39b8ca8
padding and removal of clamp in interpolator calls.
JoelPhys Apr 2, 2026
c0eb0a9
merge interp-binding to DIC-dev.
JoelPhys Apr 9, 2026
9dae1dd
small fix for __init__.py for dic following bspline python exposure
JoelPhys Apr 9, 2026
f2c0f00
renamed raster scan method from scanmethod::image to scanmethod::raster
JoelPhys Apr 10, 2026
ba902c6
basic functionality to read tiff in c++ lib
JoelPhys Apr 17, 2026
8f32a8f
struct for images. skip null subsets in optimizer. Image buffers use …
JoelPhys Apr 21, 2026
fd8f76a
file checks in python land. Images read in cpp land.
JoelPhys Apr 21, 2026
3b9f39a
option to save fft windowing results to disk
JoelPhys Apr 21, 2026
d4b4b30
updated cmakelists.txt for libtiff.
JoelPhys Apr 21, 2026
5ffc8ac
forgot to add changes to main calculate_2d call
JoelPhys Apr 21, 2026
8824f92
small change to incremental DIC RG scan.
JoelPhys Apr 21, 2026
04ede19
update to filenames when saving multiwindow FFT displacements.
JoelPhys Apr 22, 2026
4af7c56
update to error message when seed location does not converge.
JoelPhys Apr 28, 2026
467a24f
update for multiple seed selection. Still need to update ROI interact…
JoelPhys Apr 28, 2026
61dcfdd
general func to read images. functionality added to read .bmp
JoelPhys Apr 29, 2026
4d1c31f
incremental flags in python code. Move to enums for some flags.
JoelPhys Apr 29, 2026
3f71356
changes to python checks for DIC following changes to enum
JoelPhys Apr 29, 2026
40cb769
padding fft windows with 0s when exceeding img bounds.
JoelPhys Apr 29, 2026
5ea7b48
incremental flags in pybind bindings
JoelPhys Apr 29, 2026
37c7b08
incremental DIC logic.
JoelPhys Apr 30, 2026
4a64346
update for multiwindow only method to calculate ZNCC cost for matched…
JoelPhys Apr 30, 2026
b68896e
removed old result arrays.
JoelPhys Apr 30, 2026
2e5dab7
incremental DIC flags added to config struct.
JoelPhys Apr 30, 2026
8d20e5c
change to flags in DIC tests following name change of "IMAGE" to "RAS…
JoelPhys Apr 30, 2026
0b594da
removed option to save at_end. Results are saved after processing eac…
JoelPhys May 1, 2026
81ad89b
stb lib for image loading
JoelPhys May 6, 2026
18b98f8
dic arguments for custom MULTIWINDOW_RG overlap and size/steps.
JoelPhys May 7, 2026
b0ce745
main dic algo func split into separate files. simple method to update…
JoelPhys May 11, 2026
6cf00dd
small bugfix for raster scan.
JoelPhys May 12, 2026
1d8ea29
small bugfixes for peak finding and zero norming fft windows.
JoelPhys May 13, 2026
c083fe5
small updates for reliability guided algo
JoelPhys May 13, 2026
335cc60
added function for partial population of multiwindow object
JoelPhys May 13, 2026
211c806
added debug flag to propagate ROI function
JoelPhys May 13, 2026
749d308
small fix in stereoutil for peak finding
JoelPhys May 13, 2026
5c1ee8f
Updated main logic for DIC engine.
JoelPhys May 13, 2026
4a6cf7f
updated check_convergence function. Added vector (`active_ss`) that t…
JoelPhys May 13, 2026
22d63f5
added opencv linking to cmakelists.txt. changed level of info display…
JoelPhys May 13, 2026
2509766
small fix for where matched neighbours are not used in RG algo.
JoelPhys May 13, 2026
b7a91ff
fft struct now passed as arg to rigid search
JoelPhys May 13, 2026
8e08ce2
Updated error messages
JoelPhys May 13, 2026
31fc4eb
amended function calls following changes to fft rigid estimation func…
JoelPhys May 13, 2026
e745ae1
More informative incremental DIC docstring
JoelPhys May 13, 2026
d51c162
Improved outlier removal method.
JoelPhys May 13, 2026
c9f6758
outlier removal for all stages except last
JoelPhys May 13, 2026
d68c183
increased decimal precision of output data.
JoelPhys Jun 1, 2026
7c37ed4
added helper funcs for inverse shape function param composition
JoelPhys Jun 1, 2026
a9f2115
updated undistortion solver
JoelPhys Jun 1, 2026
637261b
updated stereo matching
JoelPhys Jun 1, 2026
ca708d6
updated fourier helper functions
JoelPhys Jun 1, 2026
bdcf558
updated multiwindow_only
JoelPhys Jun 1, 2026
1eac94a
small fixes to ss_grid creation
JoelPhys Jun 1, 2026
5d67182
updated default arguments in calculate_3d
JoelPhys Jun 1, 2026
94af6b0
logic for ROI updating with multiwindow_only approach.
JoelPhys Jun 1, 2026
ec72220
removed old logic in multiwindow_rg approach.
JoelPhys Jun 1, 2026
db76132
small changes to arguments for initial estaimte for the rigid displac…
JoelPhys Jun 1, 2026
e29a56d
readdition of being able to use numpy arrays for images.
JoelPhys Jun 4, 2026
7fc33a1
small change to tests for large displacement FFT check.
JoelPhys Jun 4, 2026
fd726ab
initial filename rejig for stereo strain caluclations.
JoelPhys Jun 4, 2026
7818a16
merge from dev.
JoelPhys Jun 4, 2026
4de105a
cumulative displacements now work for stereo DIC. continued work sett…
JoelPhys Jun 4, 2026
e222b87
small fix to enable stereo results to be saved for L->R reference ima…
JoelPhys Jun 5, 2026
d414c17
changed stereo matching to use matching strat2 by default.
JoelPhys Jun 12, 2026
b3c2667
option for singlewindow_rg to use rectified epipolar search depending…
JoelPhys Jun 12, 2026
964b495
changes to dicimport to be consistent for 3d. removed option for shap…
JoelPhys Jun 12, 2026
9290b39
3d strain calculations
JoelPhys Jun 12, 2026
d55bd61
small fix for file extension for stereo binary DIC data
JoelPhys Jun 12, 2026
5a26f29
small change to LM damping optimization parameters
JoelPhys Jun 12, 2026
9316167
added import_3d to the DIC __init__
JoelPhys Jun 12, 2026
878a3b9
rejig and small fix for stereo helper functions
JoelPhys Jun 12, 2026
865b0b9
moved from std::stringt to enums for several config arguments
JoelPhys Jun 15, 2026
1597eb3
fixed strain filenames when using already imported dicResults
JoelPhys Jun 15, 2026
3e4f5f8
progress bar now uses the active number of subsets. Fixed error messa…
JoelPhys Jun 15, 2026
d986ee9
bugfix for when max_displacement is set to lower than the subset_size…
JoelPhys Jun 15, 2026
5e22343
small fix for active subset count.
JoelPhys Jun 15, 2026
2ee4956
spelling mistake fix in dic3d.py
JoelPhys Jun 16, 2026
82c9472
removed old `bf_threshold` variable
JoelPhys Jun 16, 2026
17c5165
added epipolar line search distance for stereo. parameters seeded by …
JoelPhys Jun 18, 2026
03f6cbe
flag to only store subset coords when debugging. Saves a boat load of…
JoelPhys Jun 18, 2026
86f842d
default for fft windowing is now F32. Significant mem reduction while…
JoelPhys Jun 19, 2026
8979c61
small fix to spelling in python dic functions.
JoelPhys Jun 19, 2026
ae818e9
fixed a bug that allowed the rg seed to be empty [].
JoelPhys Jun 23, 2026
5e0c633
removed need for opencv on c++ side of dic calcs.
JoelPhys Jun 24, 2026
59fbcec
calibration improvements
JoelPhys Jun 24, 2026
9676c0b
fixed small bug when checking seed neighbours in multiwindow_rg.
JoelPhys Jun 24, 2026
9b3e530
removed mention of opencv in cmakelists.txt
JoelPhys Jun 24, 2026
07de038
libtiff install added to github runners.
JoelPhys Jun 25, 2026
91057cc
FIX libtiff install added to github runners.
JoelPhys Jun 25, 2026
975a647
Added TIFF_INCLUDE_DIRS to CMakeLists.txt
JoelPhys Jun 25, 2026
9c6c0c1
libtiff for cibuildwheel.
JoelPhys Jun 26, 2026
b12f0ba
removed include statement for WIP optimizer.
JoelPhys Jun 26, 2026
9679184
CIBW windows tiff.
JoelPhys Jun 26, 2026
cbb575e
macos-26 runner support
JoelPhys Jun 26, 2026
1c10a1a
use vcpkg and libraries installed there.
JoelPhys Jun 26, 2026
f1d51be
removed support for win32.
JoelPhys Jun 26, 2026
a37e17e
bumped build to use C++20.
JoelPhys Jun 26, 2026
769f0e0
fix for MSVC member sharing.
JoelPhys Jun 26, 2026
55f5de7
c++20 and moved math defines to top in relevent files.
JoelPhys Jun 29, 2026
2dca39d
wheel repair for windows.
JoelPhys Jun 29, 2026
887e3a2
FIXED wheel repair for windows.
JoelPhys Jun 29, 2026
22eaef3
wheels workflow added PATH for libtiff.
JoelPhys Jun 29, 2026
0b54b95
removed ``subset_size`` argument for ``roi.interactive_selection``.
JoelPhys Jul 3, 2026
bceb415
updates to terminal output. docstring improvements. parallel img read…
JoelPhys Jul 3, 2026
5153d33
arguments for new approach to FFT outlier filtering
JoelPhys Jul 6, 2026
0aae72d
example ground truth calibration for stereo example.
JoelPhys Jul 7, 2026
7593620
readability, docstrings, and I/O improvements for calibration
JoelPhys Jul 8, 2026
d5e6caf
updated __init__.py for calibration module
JoelPhys Jul 8, 2026
227399c
default timer debug level changed
JoelPhys Jul 8, 2026
a734911
added epipolar line offset based on temporal DIC displacments
JoelPhys Jul 8, 2026
7ed1d9b
defualt multiwindow_overlap is now 0
JoelPhys Jul 8, 2026
e952cdf
slight rename of vars in dicresults
JoelPhys Jul 8, 2026
c2e47a0
errors for multiple seeds works properly for singlewindow_rg approach.
JoelPhys Jul 9, 2026
decb322
fixed progress bar to work better with jupyter notebooks.
JoelPhys Jul 9, 2026
706e260
WIP updated DIC examples.
JoelPhys Jul 9, 2026
6cd7264
groundtruth calibration data for stereo DIC example.
JoelPhys Jul 9, 2026
a254f2e
binding function for accessing defualt num threads when not specified…
JoelPhys Jul 9, 2026
d8ea648
now possible to pass RG seeds as list of tuples e.g [(x0,y0),(x1,y1),…
JoelPhys Jul 9, 2026
2aebfbe
possible to specify multiple seeds using roi.interactive_selection()
JoelPhys Jul 9, 2026
aec875c
updated progressbar. flushes every n%.
JoelPhys Jul 10, 2026
1f1f244
continued IO work
JoelPhys Jul 13, 2026
beec793
small fix for FFT windowing progress bar not displaying for every win…
JoelPhys Jul 14, 2026
934dd0b
fft_fitler enabled by default in stereo
JoelPhys Jul 14, 2026
e6b0e5b
ROI interactive selection sidebar is fixed width
JoelPhys Jul 14, 2026
adff28f
fix for binary DIC data import
JoelPhys Jul 14, 2026
f4f6d93
small bugfixes.
JoelPhys Jul 20, 2026
64a5adb
removed old conditional checks in dic3d.py. More informative print er…
JoelPhys Jul 20, 2026
893491a
support for f32 .tiff images
JoelPhys Jul 21, 2026
701c500
updated DIC example naming
JoelPhys Jul 22, 2026
d34f1a6
updated strain module for stereo.
JoelPhys Jul 22, 2026
9070e07
updated DIC tests
JoelPhys Jul 22, 2026
b1c00c5
calibration for stereo tests
JoelPhys Jul 22, 2026
09ba761
deleted test_import.py. DIC results imported as part of strain tests.
JoelPhys Jul 22, 2026
35cb81e
updated strain tests for Stereo
JoelPhys Jul 22, 2026
117b3d2
added compile command export to CMakeLists.txt
JoelPhys Jul 22, 2026
cc0d381
tests for simple hydrostatic extension
JoelPhys Jul 22, 2026
e24e84c
dummy deformed images can be saved as f32.
JoelPhys Jul 22, 2026
a019a6c
updated images for examples and tests.
JoelPhys Jul 22, 2026
434eaec
updated images for examples.
JoelPhys Jul 22, 2026
84a9864
updated readme with DIC example.
JoelPhys Jul 22, 2026
c10c052
syntax highlighting for DIC example in readme.
JoelPhys Jul 22, 2026
4a2f3aa
further changes to readme.
JoelPhys Jul 22, 2026
5499a1e
updates to guides and examples
JoelPhys Jul 22, 2026
08acb03
Merge branch 'dev' into DIC-dev
JoelPhys Jul 22, 2026
5755272
added KeyboardInterupt for cpp signalhandler.
JoelPhys Jul 22, 2026
17f410e
updated images, banner, guide and examples.
JoelPhys Jul 22, 2026
bdefd03
merge from dev.
JoelPhys Jul 23, 2026
608423d
sensorsim gold files to prevent failing tests.
JoelPhys Jul 23, 2026
c69c1ca
removed support for macos x86_64.
JoelPhys Jul 23, 2026
f9874c8
Merge pull request #342 from Computer-Aided-Validation-Laboratory/mac…
meganasampson Jul 23, 2026
467e3a8
libtiff install for lint tests.
JoelPhys Jul 23, 2026
055a951
small bugfix for multichannel tiff images being written to int32 buffer.
JoelPhys Jul 24, 2026
0531c83
updates to tests and ROI selection to work for non-gui related functi…
JoelPhys Jul 27, 2026
ced589f
libtiff linked correctly for tests on windows.
JoelPhys Jul 27, 2026
6d8f518
attempt 2 libtiff linked correctly for tests on windows.
JoelPhys Jul 27, 2026
4a5231b
attempt 3 libtiff linked correctly for tests on windows.
JoelPhys Jul 27, 2026
bdbd7a3
attempt 4 libtiff linked correctly for tests on windows.
JoelPhys Jul 27, 2026
eae1555
Merge pull request #344 from Computer-Aided-Validation-Laboratory/DIC…
JoelPhys Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
sudo apt update
sudo apt install libegl1
sudo apt install libgl1 libxext6 libx11-6
sudo apt install libtiff-dev libtiff-tools
python -m pip install --upgrade pip
pip install pylint
pip install -e .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14, macos-15-intel, macos-26]
os: [ubuntu-latest, windows-latest, macos-14, macos-26]
env-type: [pip]
include:
- os: macos-14
llvm: llvm@15
- os: macos-15-intel
llvm: llvm@18
- os: macos-26
llvm: llvm@20
steps:
Expand Down Expand Up @@ -54,8 +52,10 @@ jobs:

- name: Install libtiff (Windows)
if: startsWith(matrix.os, 'windows')
shell: pwsh
run: |
vcpkg install tiff
vcpkg install tiff:x64-windows-static
echo "CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static" >> $env:GITHUB_ENV

- name: Install libtiff (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-15-intel, macos-26]
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-26]
include:
- os: macos-14
llvm: llvm@15
macos_deployment_target: "14.0"
- os: macos-15-intel
llvm: llvm@18
macos_deployment_target: "15.0"
- os: macos-26
llvm: llvm@20
macos_deployment_target: "26.0"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/wheels_testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-15-intel, macos-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-26]
include:
- os: macos-14
llvm: llvm@15
- os: macos-15-intel
llvm: llvm@18
- os: macos-15-latest
llvm: llvm@18
- os: macos-26
llvm: llvm@20
steps:
- uses: actions/checkout@v4

Expand Down
35 changes: 20 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
# ----------------------------
# C++ standard
# ----------------------------
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# ----------------------------
# Ensure CMAKE_BUILD_TYPE and install config
Expand All @@ -24,7 +25,11 @@ message(STATUS "CMake install config name: ${CMAKE_INSTALL_CONFIG_NAME}")
# ----------------------------
find_package(pybind11 REQUIRED)
find_package(OpenMP REQUIRED)

#find_package(OpenCV REQUIRED)
find_package(TIFF REQUIRED)
message(STATUS "TIFF_FOUND = ${TIFF_FOUND}")
message(STATUS "TIFF_INCLUDE_DIR = ${TIFF_INCLUDE_DIR}")
message(STATUS "TIFF_LIBRARIES = ${TIFF_LIBRARIES}")
# ----------------------------
# Eigen3
# ----------------------------
Expand Down Expand Up @@ -61,7 +66,7 @@ endif()
function(apply_compile_flags target_name)
if(MSVC)
# Windows (MSVC)
target_compile_options(${target_name} PRIVATE /std:c++17 /openmp)
target_compile_options(${target_name} PRIVATE /openmp)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Applying MSVC debug flags for ${target_name}")
target_compile_options(${target_name} PRIVATE /Od /Zi)
Expand All @@ -71,7 +76,7 @@ function(apply_compile_flags target_name)
endif()
else()
# Linux / macOS
target_compile_options(${target_name} PRIVATE -std=c++17 -fopenmp)
target_compile_options(${target_name} PRIVATE -fopenmp)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Applying debug flags for ${target_name}")
target_compile_options(${target_name} PRIVATE -O0 -g)
Expand All @@ -90,8 +95,8 @@ endfunction()
file(GLOB COMMON_SRC_FILES src/pyvale/common_cpp/*.cpp)

pybind11_add_module(common_cpp MODULE ${COMMON_SRC_FILES})
target_include_directories(common_cpp PRIVATE src/pyvale/common_cpp)
target_link_libraries(common_cpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen)
target_include_directories(common_cpp PRIVATE src/pyvale/common_cpp ${TIFF_INCLUDE_DIR})
target_link_libraries(common_cpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen ${TIFF_LIBRARIES})
apply_compile_flags(common_cpp)
install(TARGETS common_cpp LIBRARY DESTINATION pyvale/common_cpp)

Expand All @@ -100,20 +105,20 @@ install(TARGETS common_cpp LIBRARY DESTINATION pyvale/common_cpp)
# ----------------------------
file(GLOB DIC_SRC_FILES src/pyvale/dic/cpp/*.cpp)

pybind11_add_module(dic2dcpp MODULE ${DIC_SRC_FILES} ${COMMON_SRC_FILES})
target_include_directories(dic2dcpp PRIVATE src/pyvale/common_cpp src/pyvale/dic)
target_link_libraries(dic2dcpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen)
apply_compile_flags(dic2dcpp)
install(TARGETS dic2dcpp LIBRARY DESTINATION pyvale/dic)
pybind11_add_module(diccpp MODULE ${DIC_SRC_FILES} ${COMMON_SRC_FILES})
target_include_directories(diccpp PRIVATE src/pyvale/common_cpp src/pyvale/dic ${TIFF_INCLUDE_DIR})
target_link_libraries(diccpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen ${TIFF_LIBRARIES})
apply_compile_flags(diccpp)
install(TARGETS diccpp LIBRARY DESTINATION pyvale/dic)

# ----------------------------
# DIC Calibration
# ----------------------------
file(GLOB CALIB_SRC_FILES src/pyvale/calib/cpp/*.cpp)

pybind11_add_module(calibcpp MODULE ${CALIB_SRC_FILES} ${COMMON_SRC_FILES})
target_include_directories(calibcpp PRIVATE src/pyvale/common_cpp src/pyvale/calib)
target_link_libraries(calibcpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen)
target_include_directories(calibcpp PRIVATE src/pyvale/common_cpp src/pyvale/calib ${TIFF_INCLUDE_DIR})
target_link_libraries(calibcpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen ${TIFF_LIBRARIES})
apply_compile_flags(calibcpp)
install(TARGETS calibcpp LIBRARY DESTINATION pyvale/calib)

Expand All @@ -123,8 +128,8 @@ install(TARGETS calibcpp LIBRARY DESTINATION pyvale/calib)
file(GLOB STRAIN_SRC_FILES src/pyvale/strain/cpp/*.cpp)

pybind11_add_module(strain_cpp MODULE ${STRAIN_SRC_FILES} ${COMMON_SRC_FILES})
target_include_directories(strain_cpp PRIVATE src/pyvale/common_cpp src/pyvale/strain)
target_link_libraries(strain_cpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen)
target_include_directories(strain_cpp PRIVATE src/pyvale/common_cpp src/pyvale/strain ${TIFF_INCLUDE_DIR})
target_link_libraries(strain_cpp PRIVATE OpenMP::OpenMP_CXX Eigen3::Eigen ${TIFF_LIBRARIES})
apply_compile_flags(strain_cpp)
install(TARGETS strain_cpp LIBRARY DESTINATION pyvale/strain)

60 changes: 50 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,57 @@ The python validation engine (`pyvale`) is your virtual engineering laboratory:

We are actively developing dedicated tools for simulation and uncertainty quantification of imaging sensors including digital image correlation (DIC) and infra-red thermography (IRT). Check out the [documentation](https://computer-aided-validation-laboratory.github.io/pyvale/index.html) to get started with some of our examples.

## Quick Install
We recommend installing `pyvale` into a virtual environment of your choice as `pyvale` requires python 3.13. If you need help setting up your virtual environment and installing `pyvale` head over to the [installation guide](https://computer-aided-validation-laboratory.github.io/pyvale/install/install.html) in our docs.

`pyvale` can be installed from pypi:
```shell
pip install pyvale
```

## Quick Demo: Digital Image Correlation
Below is a really quick example for setting up a DIC calculation. It's highly likely that your case will require a more tailored calculation configuration.

**For further details please see the DIC [examples](https://computer-aided-validation-laboratory.github.io/pyvale/examples/examples_dic.html), [theory guide](https://computer-aided-validation-laboratory.github.io/pyvale/guide_theory/guide_theory_dic.html), [user guide](https://computer-aided-validation-laboratory.github.io/pyvale/guide_user/guide_dic.html) and [API](https://computer-aided-validation-laboratory.github.io/pyvale/pyvale.dic.html).**

Define the Region of Interest (ROI):

```python
import pyvale.dic as dic

roi = dic.RegionOfInterest(ref_image="image0000.tiff")
roi.interactive_selection()
```
run the DIC:

```python
# use dic.calculate_3d for stereo
dic.calculate_2d(reference="image0000.tiff",
deformed="image*.tiff",
roi_mask=roi.mask, # built using ROI tool
seed=roi.seed, # built using ROI tool
subset_size=21,
subset_step=10)
```
Import the results for any analysis/plotting:

```python
dicdata = dic.import_2d(data="dic_results*.csv", # default result files prefix
delimiter=",")


import matplotlib.pyplot as plt
plt.pcolor(dicdata.ss_x,
dicdata.ss_y,
dicdata.u_px[0]) # horizontal displacement for 0th image
plt.show()
```




## Quick Demo: Simulating Point Sensors
Here we demonstrate how `pyvale` can be used to simulate thermocouples and strain gauges applied to a [MOOSE](https://mooseframework.inl.gov/index.html) thermo-mechanical simulation of a fusion divertor armour heatsink. The figures below show visualisations of the virtual thermocouple and strain gauge locations on the simualtion mesh as well as time traces for each sensor over a series of simulated experiments.
`/pyvale` can be used to simulate thermocouples and strain gauges applied to a [MOOSE](https://mooseframework.inl.gov/index.html) thermo-mechanical simulation of a fusion divertor armour heatsink. The figures below show visualisations of the virtual thermocouple and strain gauge locations on the simualtion mesh as well as time traces for each sensor over a series of simulated experiments.

The code to run the simulated experiments and produce the output shown here comes from [this example](https://computer-aided-validation-laboratory.github.io/pyvale/examples/basicsensorsim/ex0_quickstart.html). You can find more examples and details of `pyvale` python API in the `pyvale` [documentation](https://computer-aided-validation-laboratory.github.io/pyvale/index.html).

Expand All @@ -18,15 +67,6 @@ The code to run the simulated experiments and produce the output shown here come
|--|--|
|*Thermocouple time traces over a series of simulated experiments.*|*Strain gauge time traces over a series of simulated experiments.*|


## Quick Install
`pyvale` can be installed from pypi:
```shell
pip install pyvale
```

We recommend installing `pyvale` into a virtual environment of your choice as `pyvale` requires python 3.13. If you need help setting up your virtual environment and installing `pyvale` head over to the [installation guide](https://computer-aided-validation-laboratory.github.io/pyvale/install/install.html) in our docs.

## Contributors
The Computer Aided Validation Team at UKAEA:
- Lloyd Fletcher ([ScepticalRabbit](https://github.com/ScepticalRabbit)), UK Atomic Energy Authority
Expand Down
1 change: 1 addition & 0 deletions docs/source/_static/cal_target_flipped.png
1 change: 1 addition & 0 deletions docs/source/_static/dic_ex10_3d.png
1 change: 1 addition & 0 deletions docs/source/_static/dic_ex11_3d.png
1 change: 1 addition & 0 deletions docs/source/_static/dic_ex11_roi.png
1 change: 1 addition & 0 deletions docs/source/_static/incremental_dark.png
1 change: 1 addition & 0 deletions docs/source/_static/incremental_light.png
1 change: 1 addition & 0 deletions docs/source/api_py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Detailed Python API

pyvale.sensorsim
pyvale.blender
pyvale.calib
pyvale.dic
pyvale.strain
pyvale.mooseherder
Expand Down
17 changes: 11 additions & 6 deletions docs/source/examples/examples_dic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ DIC & Strain Calculations
.. toctree::
:maxdepth: 1

dic/ex1_region_of_interest.rst
dic/ex2_plate_with_hole.rst
dic/ex3_plate_with_hole_strain.rst
dic/ex4_dic_blender.rst
dic/ex5_dic_challenge.rst
dic/ex6_hrdic.rst
dic/ex01_region_of_interest.rst
dic/ex02_plate_with_hole.rst
dic/ex03_plate_with_hole_strain.rst
dic/ex04_dic_blender.rst
dic/ex05_dic_challenge.rst
dic/ex06_hrdic.rst
dic/ex07_incremental.rst
dic/ex08_calibration.rst
dic/ex09_stereo.rst
dic/ex10_stereo_platehole.rst
dic/ex11_dic_chal.rst

1 change: 1 addition & 0 deletions docs/source/guide_theory/guide_theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Module user guides
:maxdepth: 1

guide_theory_dic.rst
guide_theory_dic_stereo.rst


14 changes: 8 additions & 6 deletions docs/source/guide_theory/guide_theory_dic.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _guide_theory_dic:

DIC Theory Overview
DIC
======================================

Digital Image Correlation (DIC) is a technique for measuring
Expand Down Expand Up @@ -147,15 +147,17 @@ further updates would produce only negligible changes in the parameters and the
cost function.


Sub-pixel Accuracy With Interpolation
--------------------------------------
Interpolation Methods for Sub-pixel Accuracy
---------------------------------------------

DIC aims for precision beyond the integer values defined by the image's pixel grid. Integer-pixel
matching is a good start, but physical displacements do not perfectly map to pixel
boundaries. To capture this, we refine the measurement to *sub-pixel*
accuracy using interpolation. Instead of treating the image as a discrete
array, we approximate it as a smooth surface. This is done using **cubic B-spline
interpolation**.
accuracy using interpolation. Pyvale supports two interpolation methods selectable via the
:code:`interpolation_routine` parameter in :code:`calculate_2d()` and :code:`calculate_3d()`:

- **BSPLINE** (default): Cubic B-spline interpolation (described below).
- **HERMITE**: Hermite cubic interpolation, an alternative method that can be faster for some use cases.

Cubic B-spline Interpolation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading
Loading