Python code for applying the Photoelastic Vector Subtraction Technique (PVST) for surface strain measurements.
If you are running this code for the first time you will need to install the following python libraries: matplotlib, opencv-python, tqdm
The file "MASTER.py" is the top level code that calls each of the 5 steps. You should only need to run "MASTER.py". Within this file, ensure you provide the correct file paths to your strained and unstrained image files. All the other .py files contain multiple functions that work together to achieve that step from the PVST. The largest of these is "step5_plots.py" which contains functions to generate many different plots.
By splitting the code into the PVST steps, you can make changes to later steps (like plotting the results) without the need to run all the steps. This is particularly useful when working with large images as step3 can be quite time-consuming. To only run some of the steps, you can comment out the steps you do not want to run. You should ensure that the requisite files generated by earlier steps exist in the directory for later steps to run. If they do not, an error will be displayed.
The outputs are numerous and are stored in a subdirectory. You can specify the name of this subdirectory using the "directory_name" variable in "MASTER.py". You should use a new directory_name for each new set of images that you process.
For more information on the available inputs and outputs, you should read the docstring at the start of each function. You should also read the academic paper and report that were developed as part of this research project.