pyvale.dic.dicresults module

class StereoResults(disparity_u_px, disparity_v_px, u_mm, v_mm, w_mm, x_mm, y_mm, z_mm, mag_px=None, converged=None, cost=None, ftol=None, xtol=None, niter=None)[source]

Bases: object

Data container for stereo DIC results

disparity_u_px

Horizontal left-to-right stereo disparity in pixels. shape=(img_num,y,x)

disparity_v_px

Vertical left-to-right stereo disparity in pixels. shape=(img_num,y,x)

u_mm

Horizontal displacement in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

v_mm

Vertical displacement in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

w_mm

Axial displacement in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

x_mm

X-coordinate in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

y_mm

Y-coordinate in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

z_mm

Z-coordinate in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

mag_px

Stereo disparity magnitude in pixels, typically computed as sqrt(disparity_u_px^2 + disparity_v_px^2). shape=(img_num,y,x)

converged

boolean value for whether the subset has converged or not. shape=(img_num,y,x)

cost

Final cost or residual value from the correlation between subset in left and right image as calculated using ZNCC. shape=(img_num,y,x)

ftol

Final ftol value from the optimization routine, indicating function tolerance. shape=(img_num,y,x)

xtol

Final xtol value from the optimization routine, indicating solution tolerance. shape=(img_num,y,x)

niter

Number of iterations taken to converge for each subset point. shape=(img_num,y,x)

__init__(disparity_u_px, disparity_v_px, u_mm, v_mm, w_mm, x_mm, y_mm, z_mm, mag_px=None, converged=None, cost=None, ftol=None, xtol=None, niter=None)
class Results(ss_x, ss_y, u_px, v_px, u_mm=None, v_mm=None, x_mm=None, y_mm=None, mag_px=None, converged=None, cost=None, ftol=None, xtol=None, niter=None, filenames=None, stereo=None)[source]

Bases: object

Data container for DIC analysis results.

This dataclass stores the displacements, convergence info, and correlation data associated with a DIC computation.

ss_x

The x-coordinates of the subset centers (in pixels). shape=(img_num,y,x)

__init__(ss_x, ss_y, u_px, v_px, u_mm=None, v_mm=None, x_mm=None, y_mm=None, mag_px=None, converged=None, cost=None, ftol=None, xtol=None, niter=None, filenames=None, stereo=None)
ss_y

The y-coordinates of the subset centers (in pixels). shape=(img_num,y,x)

u_px

Horizontal displacements in pixels at each subset location. shape=(img_num,y,x)

v_px

Vertical displacements in pixels at each subset location. shape=(img_num,y,x)

u_mm

Horizontal displacement in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

v_mm

Vertical displacement in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

x_mm

X-coordinate in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

y_mm

Y-coordinate in physical units of mm relative in cam0 world coordinate system. shape=(img_num,y,x)

mag_px

Displacement magnitude in mm at each subset location, typically computed as sqrt(u^2 + v^2). shape=(img_num,y,x)

converged

boolean value for whether the subset has converged or not. shape=(img_num,y,x)

cost

Final cost or residual value from the correlation optimization as calculated using ZNCC. shape=(img_num,y,x)

ftol

Final ftol value from the optimization routine, indicating function tolerance. shape=(img_num,y,x)

xtol

Final xtol value from the optimization routine, indicating solution tolerance. shape=(img_num,y,x)

niter

Number of iterations taken to converge for each subset point. shape=(img_num,y,x)

filenames

name of DIC result files that have been found

stereo

Optional field to store stereo DIC results if available.