# DIC_LIPEC
Python package to perform stereo calibration for Digital Image Correlation (DIC)
# The Package in Brief
- [x] A calibration patern that can be implemented in real life scenario
- [x] A dual webcam setup ensuring the same view from both webcams and focused at a particular point in the calibration pattern
- [x] Capture frames of the calibration pattern using the stereo system
- [x] Frames must be on .jpg or .png format
- [ ] The package works with .tiff format images
- [x] Detect points from the captured frames using template matching algorithm and recognise a grid pattern
- [ ] Template matching works on all captured frames
- [x] Use the detected grid and points for stereo calibration
- [x] Determine intrinsic and extrinsic parameters for both webcams
# Main features
* The package is built using Python 3.7.6 consisting of three different functions.
* Function CaptureFrames() is used to setup the dual webcam framework required for DIC. Following this the webcams are used to capture frames of the calibration pattern for different rotations of the pattern.
* Function SingleSurfaceCalibration() is used for stereo calibration involving only one calibration pattern, i.e., a single grid.
* Function DoubleSurfaceCalibration() is used for stereo calibration involving two calibration patterns, i.e., two grids.
# Quickstart
If you know what you're doing, then this section is for you. Otherwise, you should go to the `Getting Started` section.
#### Windows:
```
sudo apt install python3-pip python3-venv
git clone https://github.com/stochasticmaterialism/Digital-Image-Correlation-DIC-/tree/DIC_LIPEC/DIC_LIPEC
pip install -r requirements.txt
cd DIC
python setup.py install
```
Basic usage:
```
from DIC_LIPEC import *
```
# Getting started
## Installation
The following pieces of software are required to implement the package:
* Python 3.6 or higher
* A Python editing platform like Jupyter Notebook which comes as a part of the Anaconda Distribution
The list of necessary python packages is provided in the `requirements.txt` file and can be installed using pip:
```
pip install -r requirements.txt
```
# Function description
```yaml
from DIC_LIPEC import CaptureFrames
CaptureFrames(stamp)
Input
stamp: This parameter defines the delay between two webcams
Output
Displays the total time duration for which the webcams were on along with their time stamp along with the total number of frames captured by both webcams. Besides, with the user permission, the functions saves all the captured frames in the C drive of the devicebeing used. Images are saved in by the names xxxxx_y where xxxxx represents the frame number while y is 1 if the frame is captured by the left webcam and 0 for right webcam.
```
```yaml
from DIC_LIPEC import SingleSurfaceCalibration
arr1,arr2,arr3,arr4=SingleSurfaceCalibration(location1,type1,location2,type2,location3,threshold1,threshold2)
Input
location1: Location of the folder where the captured frames are saved
type1: Image format of the captured frames
location2: Location of the folder where the templates to detect the special points are saved
type1: Image format of the templates used to detect the special points
location3: Location of the image template used to detect the normal points
threshold1: parameter to detect normal points
threshold2: parameter to detect special points
Output
arr1: Array with all pixel coordinates for the normal points detected for all frames
arr2: Array with all pixel coordinates for the special points detected for all frames
arr3: Array with the intrinsic and extrinsic parameters for left webcam
arr4: Array with the intrinsic and extrinsic parameters for right webcam
```
# Functions expected to be available in the next version
```yaml
from DIC_LIPEC import DoubleSurfaceCalibration
arr1,arr2,arr3,arr4,arr5,arr6,arr7,arr8=DoubleSurfaceCalibration(location1,type1,location2,type2,location3,threshold1,threshold2)
Input
location1: Location of the folder where the captured frames are saved
type1: Image format of the captured frames
location2: Location of the folder where the templates to detect the special points are saved
type1: Image format of the templates used to detect the special points
location3: Location of the image template used to detect the normal points
threshold1: parameter to detect normal points
threshold2: parameter to detect special points
Output
arr1: Array with all pixel coordinates for the normal points detected for grid 1 for all frames
arr2: Array with all pixel coordinates for the special points detected for grid 2 for all frames
arr3: Array with all pixel coordinates for the normal points detected for grid 1 for all frames
arr4: Array with all pixel coordinates for the special points detected for grid 2 for all frames
arr5: Array with the intrinsic and extrinsic parameters for left webcam for grid 1
arr6: Array with the intrinsic and extrinsic parameters for left webcam for grid 2
arr7: Array with the intrinsic and extrinsic parameters for right webcam for grid 1
arr8: Array with the intrinsic and extrinsic parameters for right webcam for grid 2
```
# Guide
* Images folder consists of the templates used to detect normal and special points
* Numerical aspects of Calibration explains the mathematical background to carry out calibration
* test.py is used to test the package once installation is complete
## Contribute ?
Maybe you need something for your own project, maybe you found a mistake or something you could improve and feeling like helping, in any case, we'll be happy to get in touch. Please leave us an Issue, or a Pull Request (we welcome those!).
# Disclaimer
This software is for educational and research purposes only. Use it at your own risks.
没有合适的资源?快使用搜索试试~ 我知道了~
DIC适用于损伤力学和裂纹_Python_下载.zip
共53个文件
jpg:43个
py:5个
pdf:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 49 浏览量
2023-04-10
23:44:16
上传
评论
收藏 225KB ZIP 举报
温馨提示
DIC适用于损伤力学和裂纹_Python_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
DIC适用于损伤力学和裂纹_Python_下载.zip (53个子文件)
Digital-Image-Correlation-DIC--main
setup.py 936B
LICENSE 26KB
requiremments.txt 46B
Numerical Aspects of Calibration.pdf 133KB
DIC_LIPEC
__init__.py 69B
CaptureFrames.py 6KB
SingleSurfaceCalibration.py 27KB
Images
Calibration Template.jpg 18KB
Calibration Templates for Special Points
template20.jpg 18KB
template27.jpg 18KB
template26.jpg 18KB
template30.jpg 18KB
template42.jpg 18KB
template21.jpg 18KB
template2.jpg 18KB
template5.jpg 18KB
template25.jpg 18KB
template14.jpg 18KB
template3.jpg 18KB
template22.jpg 18KB
template1.jpg 18KB
template28.jpg 18KB
template15.jpg 18KB
template34.jpg 18KB
template7.jpg 18KB
template31.jpg 18KB
template8.jpg 18KB
template39.jpg 18KB
template36.jpg 18KB
template37.jpg 18KB
template38.jpg 18KB
template10.jpg 18KB
template9.jpg 18KB
template32.jpg 18KB
template35.jpg 18KB
template29.jpg 18KB
template11.jpg 18KB
template40.jpg 18KB
template17.jpg 18KB
template13.jpg 18KB
template24.jpg 18KB
template33.jpg 18KB
template23.jpg 18KB
template19.jpg 18KB
template41.jpg 18KB
template4.jpg 18KB
template6.jpg 18KB
template16.jpg 18KB
template18.jpg 18KB
template12.jpg 18KB
Calibration Pattern.pdf 8KB
test.py 719B
README.md 6KB
共 53 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9153
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功