dicengine / dice

Digital Image Correlation Engine (DICe): a stereo DIC application that runs on Mac, Windows, and Linux
Other
340 stars 125 forks source link

incremental correlation results not reported in undeformed coordinates for SIGMA field #238

Open alchemist31 opened 2 years ago

alchemist31 commented 2 years ago

With: Parameter name="use_incremental_formulation" type="bool" value="true" the result.txt files, as well as the solution.e file does not appear to present results in the undeformed reference space - if the sample has been displaced during the test the sequence of strain/displacement maps appear to move along with the sample. This is as viewed with "apply displacements' unchecked in Paraview, or viewing a data field in MATLAB as an image based on subset coordinates.

The is not the case when Parameter name="use_incremental_formulation" type="bool" value="false". My recollection is that in commercial DIC software, the data array is always in the undeformed coordinate system regardless of choice of incremental correlation or not.

Does this match your experience and is it deliberate?

dicengine commented 2 years ago

I'm not sure I understand your question exactly. Can you provide some images or a plot that illustrates what you are trying to say? In particular could you be more clear about what you mean by "the sequence of strain/displacement maps appear to move along with the sample". Maybe an image would help me understand what you mean.

alchemist31 commented 2 years ago

Attached are some results from a small example problem that should illustrate the result leading to the original question.

DICe_issue.pdf

dicengine commented 2 years ago

Thanks for providing the pdf. That was helpful.

What you are observing only applies to SIGMA. The displacement field and strains are indeed computed with respect to the reference frame (frame 0 in your case). The reason you see SIGMA "drift" in your pdf file is because in DICe sigma is a frame-to-frame metric that gives an indication of the uncertainty in the displacement field based on two things: the noise level in the deformed image and the image gradients that were used in the estimation of the displacement field. In the non-incremental case, the image gradients always come from the reference frame. In the incremental formulation in DICe the image gradients are updated each frame because the correlation is between frame n and n-1, not frame 0. Hence we decided that a better SIGMA measure would include the image gradients from frame n-1, not from frame 0 as in the case with the non-incremental formulation. It comes down to which image gradients are driving the correlation for frame n and using those gradients to compute SIGMA.

I verified that for your images (cropped from the pdf) that the displacement field is correct for both the incremental and non-incremental formulation. The presence of drift in the strain field is hard to verify for your images (because it's rigid body motion with no strain), but there are other test cases in DICe that verify the strains are measured in reference to the undeformed configuration of frame 0.

So in summary, what you are observing is only true for SIGMA, and yes what you are observing is intentional. Hope that helps.

alchemist31 commented 2 years ago

I see - thank you for the clarification. My original question was a bit confused as I had observed some effects in my real data set that I believe was because I didn't account for the following:

It seems that both strain and displacement fields are really 'incremental strain' and 'incremental displacement'; i.e. to get the total displacement of a point, if DICe is used with incremental correlation, one would need to sum the displacement and strain data over all previous results.txt files. The end resulting being that if one fails to do so, and there is a strain followed by simple rigid body motion, that the final result file will show no strain field. I have attached another few slides showing this.

If I remember correctly, this would be a major difference between DICe and something like VIC. In the latter, I dont think that choice of incremental vs non-incremental has this same effect.

DICe_issue_2.pdf Stack

dicengine commented 2 years ago

Which version of DICe are you using? If I run your images from the stack .gif in version 3.0-beta.4 I see nearly the exact same displacement and strain fields from using the incremental or non-incremental formulations. For example, below is the displacement in x for frame 4 of the .gif for both formulations:

non-incremental_frame4_ux incremental_frame4_ux
dicengine commented 2 years ago

Looks like there have been several commits that could have addressed the issue you are seeing: https://github.com/dicengine/dice/search?q=incremental&type=commits If you are using a version of DICe that is older than Apr 25th of 2021, the incremental formulation had a bug. Hopefully, a version update is all that you need.

alchemist31 commented 2 years ago

Thank you - yes my version is outdated. I will update. Thanks for the explanations!