pysdic.compute_pixel_residual_maps#

compute_pixel_residual_maps(analysis, residuals, *, fill_radius=None)[source]#

Draw the residuals of the material points of a pairing (see pysdic.compute_residuals() and pysdic.SDICCorrelationTerm.compute_residuals()) on the pixels of its two views.

The residual of a point belongs to the material point, not to a view: it is drawn at the projection of the point in each view. Each pixel gets the mean residual of the points projected in it (nearest pixel), NaN without point. The resolution of the maps is the density of the integration points in the views: with less than one point per pixel, some pixels have no point (see fill_radius).

Note

No ray casting: the residuals are exactly those of the correlation term (corrected gray levels), and the occlusions are not taken into account (as in the term).

Parameters:
  • analysis (pysdic.SDICAnalysis) – The analysis (the sizes of the sensors of the views).

  • residuals (pysdic.PairingResiduals) – The residuals of the pairing.

  • fill_radius (Optional[Real], optional) – If given, a pixel without point takes the value of the nearest pixel with a point if it is within fill_radius pixels (e.g. 1.0 to close the holes of a density of about one point per pixel). By default, no filling: the maps show the actual density of the points.

Returns:

map_1, map_2 – The residual maps on the views 1 and 2 of the pairing, of shape \((H, W)\) for one channel or \((H, W, C)\).

Return type:

numpy.ndarray