DICpy.math4dic¶
- DICpy.math4dic.derivatives(img1, img2=None)[source]¶
First order derivatives in x, y, and time (for two images).
Input: * img1 (ndarray)
Image in time t.
- img2 (ndarray)
Image in time t + dt.
Output/Returns: * gx (ndarray)
Derivative in x (columns) for img1.
- gy (ndarray)
Derivative in y (rows) for img1.
- gt (ndarray)
Derivative in time for img1 (optiional).
- DICpy.math4dic.gradient(img, k)[source]¶
Estimate the gradient of images using Sobel filters from OpenCV-Python.
Input: * img (ndarray)
Image.
- k (ndarray)
Order of approximation.
Output/Returns: * gx (ndarray)
Derivative in x (columns).
- gy (ndarray)
Derivative in y (rows).
- DICpy.math4dic.interpolate_template(f=None, x=None, y=None, dx=0, dy=0, dim=None)[source]¶
Method of interpolation.
Input: * f (ndarray)
Source image.
- x (ndarray)
Integer pixel position in the x direction.
- y (ndarray)
Integer pixel position in the y direction.
- dx (float)
Sub-pixel increment in the x direction.
- dy (float)
Sub-pixel increment in the y direction.
Output/Returns: * z (ndarray)
Interpolated image.
- DICpy.math4dic.interpolate_template2(f=None, x=None, y=None, dx=0, dy=0)[source]¶
Method of interpolation.
Input: * f (ndarray)
Source image.
- x (ndarray)
Integer pixel position in the x direction.
- y (ndarray)
Integer pixel position in the y direction.
- dx (float)
Sub-pixel increment in the x direction.
- dy (float)
Sub-pixel increment in the y direction.
Output/Returns: * z (ndarray)
Interpolated image.
- DICpy.math4dic.norm_xcorr(f, g)[source]¶
Normalized cross correlation.
Input: * f (ndarray)
Image.
- g (ndarray)
Image.
Output/Returns: * c (float)
Correlation.