Virtual Image Correlation uncertainty
Abstract
The Virtual Image Correlation method applies for the measurement of silhouettes boundaries with sub-pixel precision.
It consists in a correlation between the image of interest and a virtual image based on a parametrized curve.
Thanks to a new formulation, it is shown that the method is exact in 1D, insensitive to local curvature and to contrast variation, and that the bias induced by luminance variation can be easily corrected.
Optimal value of the virtual image width, the sole parameter of the method, and optimal numerical settings are established.
An estimator is proposed to assess the relevance of the user-chosen curve to describe the contour with a sub-pixel precision.
Analytical formulas are given for the measurement uncertainty in both cases of noiseless and noisy images and their prediction is successfully compared to numerical tests.
Keywords: Virtual Image Correlation; Digital Image Correlation
The software ”Funambule” associated with this publication is available at
https://zenodo.org/record/3862248, DOI : 10.5281/zenodo.3862248
or, for latest version,
https://github.com/marc-l-m-francois/Funambule/releases
1 Introduction
The Virtual Image Correlation (VIC) originates from the global form of the Digital Image Correlation (DIC) method [8, 9].
However, in the VIC, the second image is an elementary and unitary virtual one which mimics the white to black gradient of the boundary and whose shape is defined from a parametrized curve.
At convergence, when virtual and physical images are close as possible, the curve shape represents a measurement of the contour.
The very first version of the VIC was dedicated to open contour measurement [7].
Its extension to silhouette measurement followed [16, 13] then a numerically efficient version benefitting of close DIC developments [14].
Further work concerned various application of the method for the mechanical testings [6, 3, 5] or in medicine [10].
The major interest of the VIC is its precision, in some case better than pixels [16].
However, the present article was motivated by a need for more objective evaluation of the uncertainty, with predictive formulas.
In Sec. 2 is shown a slightly modified version of the method, in which the mean square distance between virtual and physical images is calculated in the frame of the virtual image.
This gives both a slightly better precision and much simpler equations.
Section 3 is dedicated to the quantification of uncertainties.
It begins by establishing a set of simplified equations, which are used at first to prove that the method is theoretically exact in 1D.
The VIC requires the chosen curve family to be able to fit the contour of interest.
Aiming sub-pixel precision, the simple observation of the obtained curve superposed to the silhouette is not sufficient to check this point.
A signed distance is proposed, which consists in a local measurement of the silhouette in the virtual image frame.
Its graph emphasis the local accuracy of the identification and its spectral analysis informs about the relevance of the chosen curve to depict the contour.
The image discretization is an inevitable cause of uncertainty that leads to the ultimate accuracy of the method.
An empirical law, deducted from statistics on numerical tests, is proposed to assess it.
Effect of imperfect brightness and contrast are studied analytically.
It is shown that contrast has no effect on the precision but that brightness induces a bias which can be suppressed by a linear correction of the image.
Then, the measurement uncertainty due to image noise is quantified by a simple analytical formula.
A simple graph summarizes the expected accuracy as a function of the image noise and the number of parameters of the curve.
Section 4 validates the proposed expressions of uncertainties, through statistics on old [16] and new synthetic tests. In addition to the comparisons already made (in [16]) with the Fast Marching Algorithm [17] and the Steger’s method [18], new comparisons are made here with the active contour method [11] and the recent method of Trujilo-Pino [22] which are both known for their sub-pixel precision. Tests on noisy images also emphasize the robustness of the VIC. For all synthetic images used in this article, the grey levels of the transition pixels (through which the edge passes) are calculated from the ratio of the white (background) and black (silhouette) surfaces seen by the pixel.
2 The VIC method

The silhouette of interest in image F is measured by finding the best coincidence between F and a virtual image G based on a parametrized curve (see Fig. 1). Image F has grey levels where is the position vector of components associated to the pixel frame. The virtual image G of gray levels is a deformation of an elementary image g of grey levels such as:
(1) | |||||
(2) |
where the position vector has components and . The linear evolution of the gray level is chosen in order G to be roughly similar to the gray level evolution across the boundary in F. A current point of G is defined from the user-chosen parametric curve of current point (see Fig. 2):
(3) |

where is used as the curve parameter, the are the (researched) shape parameters and are respectively the unitary tangent and normal vectors to the curve:
(4) | |||||
(5) |
where denotes the cross product and is the unitary vector normal to the plane.
Above definition guarantees that points uniformly outside any closed curve orientated positively.
The goal of the method is to find the shape parameters of for which F and G are in best coincidence. As for some DIC methods [8], the mean square difference between the two images is minimized:
(6) |
This expression was used in the very first version of the VIC [7, 16] in which the surface area (the denominator) was constant. Neglecting the surface variation allows the use of numerically efficient DIC algorithms [14] but with a loss of accuracy. Strictly speaking, the length of the curve, so the area, is not constant. Furthermore, the differential surface element depends, by Eq. (38), upon the curvature and neglecting it creates a slight but unwanted line tension effect. The proposed minimization function is expressed in the frame of the virtual image:
(7) |
in which . The denominator represents the constant surface area of g (of value 2) and the differential surface element is independent of the curvature. The minimization of with respect to is achieved by using a Newton scheme, solving iteratively the linear system:
(8) |
where is the corrector of the current values of the curve parameters and where:
(9) | |||||
(10) | |||||
(11) | |||||
Annex A shows that it is possible, under some reasonable assumptions, to take into account only the last term (as done in DIC [8]) thus:
(12) |
in which, from Eq. (3):
(13) |
The derivatives of the curve points are supposed either analytically or numerically known. Curvilinear abscissa and curvature are:
(14) | |||||
(15) |
and is the overall curve length. If the non-overlapping condition:
(16) |
is not fulfilled, the center of the osculating circle of of radius is inside the virtual image G, thus some points in the vicinity of this center are defined at least twice. However, in a practical point of view, experience shows that it is possible to overcome this second condition as soon as the sharp corners of do not exceed the right angle because sharper angles put in coincidence inner black points of G with outer white points of F. At last, from Eq. (13) the curve must not have any stationary points:
(17) |
3 Uncertainty of the VIC measurement
3.1 Set of simplified equations in ideal cases
In order to study the precision of the method, the above set of equation is simplified hereafter. At first we suppose that, close to the solution, (as it is the case for , see Eqs. (1, 2)) thus:
(18) |
Together with Eq. (13), this allows the separation of variables in Eq. (10):
(19) |
The current term of the first integral is null if is everywhere collinear to , corresponding to a tangential motion which lets the curve unchanged: such case has to be avoided when choosing a curve equation. Thus, at convergence of the Newton scheme, when :
(20) |
At last, if the virtual image borders lie one in the white background and one in the black silhouette: and , an integration by parts gives:
(21) |
which shows that, at convergence, the mean value of is .
3.2 Exact 1D discrete measurement

Let , where is the Heavyside distribution, be the physical luminance of a 1D silhouette (Fig. 3). Supposing ideal sensor (linear and homogenous) and optics, the pixel returns the value (blue dots). In 1D, the curve is degenerated into a point ( is meaningless) whose parameterized equation is simply chosen as and the mapping (Eq. 3) reduces to . Due to the absence of curvature, expressions (Eq. 6) and (Eq. 7) are equivalent thus Eq. (21) corresponds to:
(22) |
if and , i.e. if the support of is wide enough: and . Because , this leads to impose . Solving this integral with the analytical expression of the linear interpolation (thick blue segments in Fig. 3) gives straightforwardly . This shows that the VIC measurement corresponds exactly to the prescribed edge location , whatever and .
3.3 Uncertainty due to curve mismatch and local correlation indicator
The VIC method requires the user-chosen curve to be able to fit the contour of interest. Fig. 4 shows that, if the curve matches, f appears as invariant along (very similar to g) but shows waviness in the opposite case. However, a more objective indicator is necessary to quantify the quality of the identification. A straightforward idea consists in using as local correlation function but, g being not physical and being user chosen, this function only brings a qualitative information and does dot distinguish if the curve is inside or outside the contour.


From Eq. (21), we define the signed distance:
(23) |
This one is defined in the frame and corresponds to in the pixel frame .
Fig. 4 shows that represents a local identification of the boundary.

a)

b)

c)

d)
Fig. 5 is related to the well-know impossibility for a B-Spline to depict a circle [12].
When using a 10 points B-Spline, a peak of magnitude pixel at wavelength pixels ( pixel) is visible in the FFT of .
It reveals a periodic oscillation of the curve from inside to outside of the exact circle in between the ten (regularly spaced) control points, which would be hard to see on a representation such has Fig. 4.
Cases with noisy images lead to an additional noise spectrum whose mean amplitude is close to the estimation of Eq. (32) of for the B-Spline and for the circle.
Curve mismatching induces long wave oscillations of which are revealed by a spectral analysis as long as they are not hidden by image noise. The acceptable precision, i.e. the magnitude of the maximum peak, remains the the user’s decision.
3.4 Uncertainty associated to discretization
If the VIC has been shown in Sec. 3.2 to be theoretically exact in 1D, things are more complicated in 2D.
The pixel grid is used as computational frame in most of image analysis methods, including DIC and some versions of VIC using [14].
However, many tests showed that computing on a regular discretization of (see Fig. 4) provides better precision, as soon as the distance between two corresponding points is less than pixel [16].
The values of F, required for Eq. (7) at these non integer values are obtained by interpolation.
Another series of tests showed that the simplest and fastest linear interpolation gives equivalent or even better precision than cubic or B-spline interpolation.
This is different from DIC, but in accordance with the analytical analysis in Sec. 3.2.

In Sec. 3.2 we showed that should be greater than 1.5 pixel. In order to set the optimal value of for 2D images, we proceed to tests on synthetic images of linear edges identified with a line segment (Fig. 6).
To address any cases, the angle from to the edge is varied from 0 to , the ordinate of its midpoint is varied of pixel and the length of the segment is varied of pixel.
Ten levels are used for each variation.
The mean and the standard deviation of the distance between identified and exact segments are computed.
In average, setting gives and and setting gives , .
However Fig. 7 shows that choosing eliminates pathologic cases of small angles (such as shown by Fig. 6).
Setting other (especially larger) values for did not provide any advantage.
As a consequence, appears to be the optimal value for the VIC.




In order to get an estimator of the uncertainty associated to the sole effect of discretization, similar line segment tests have been realized, varying the length over two decades.


Fig. 8 shows that the mean distance is weak for all and that the standard deviation is very close to its linear regression (blue line on Fig. 8). The proposed empirical rule:
(24) |
corresponds to the red line. The role of the number of curve parameters in this equation, of two in these tests (ordinate and angle), is supposed to be equivalent to the one it has in Eq. (32).
3.5 Uncertainty associated to brightness and contrast defects
At ideal, the silhouette is black and the background is white. However, real images may have contrast and luminance deviations. From Sec. 3.2, the average of over all possible is linear: . Thus, for this analytical study, we suppose to be the continuous linear piecewise function (see Fig. 9):
(25) |
where is the amplitude (contrast), the bias (luminance), the location of the researched edge. The origin of the virtual image at defines the VIC measurement thus (in the frame ) or (in the pixel frame ) is the measurement error.

Used together with Eq. (20), which is fulfilled at convergence, above expressions give:
(26) |
As a consequence, the contrast has no influence on the precision but a luminance variation induces a bias in the measurement. In a practical point of view, this is easily annulated during computation by a linear correction of the gray levels of F. Similar calculus shows that non linear image corrections should be avoided because they induce a bias. In particular, best results will be obtained with CCD sensors with good linearity.
3.6 Uncertainty associated to image noise
Inevitable image noise leads to uncertainty in the VIC measurement. We suppose now that each pixel of integer coordinates is the sum of an exact value and a gaussian noise , spatially uncorrelated, of zero mean and of standard deviation . With the hypothesis of Sec. 3.1, we show in Annex B that:
(27) |
From the Newton scheme (Eq. 8), this term is associated to the standard deviation of each shape parameter by:
(28) |
The average of the standard deviation of the distance from the measurement to the noiseless solution is:
(29) |
From we deduce:
(30) |
Gathering previous expressions gives . However this complex expression has to be computed in each cases. A simpler approximation is obtained by supposing at first a perfectly contrasted image with and . Eq. (25) and Eq. (12) give:
(31) |
At second we retain only the diagonal terms of this matrix, which corresponds to consider that each shape variable acts on a separate part of the curve. This gives a simple approximation of the VIC standard deviation due to the image noise:
(32) |
The proportionality between and the image noise is common with DIC uncertainty analysis [15, 20, 19, 4]. Doubling the image resolution doubles thus divides by . The uncertainty is proportional to : this weak dependance allows the user to retain complex curve families. This formula erroneously suggest the use of large but the calculus is valid for the active part of the virtual image thus one may consider . The quantification noise, of classical expression where is the bit depth, can also be taken into account as an additional image noise.
3.7 Summary

Fig. 10 shows the uncertainty of the method, according to expressions of (Eq. 24) and (Eq. 32).
It shows in particular that the irreducible uncertainty , associated to discretization, can only be attained with low image noise and large curve support .
Of course this graph is valid only in absence of curve fitting error.
4 Validation and comparison of the VIC uncertainty
4.1 Validation of the proposed expressions
In table 1 we compare predicted and measured uncertainties on various tests. Cases C1 to C4 correspond to numerical tests onto a pixels image of a spiral [16]. Cases D1 to D3 refer to synthetic images of discs of average radii respectively of 3 (Fig. 4), 10, 100 pixels whose center and radius are randomly varied over 1 pixel, over 100 trials. Cases D to D are similar, but with an additive gaussian image noise . All images are in 8 bits. The standard deviation associated to discretization is obtain by Eq. (24) and the one associated to image noise by Eq. (32). The quantification noise is took into account in .
case | ||||||||
C1 | ||||||||
C2 | ||||||||
C3 | ||||||||
C4 | ||||||||
D1 | ||||||||
D | ||||||||
D2 | ||||||||
D | ||||||||
D3 | ||||||||
D |
One observes that the predicted values of are in good agreement with measured ones . The sole exception is the case C1 for which a curve fitting error is present, the 10 control points of the B-Spline being not enough to describe the spiral at this level of precision.
4.2 Comparison between the VIC and other methods uncertainties
The VIC method has been already successfully compared to Fast Marching Algorithm [17] and Steger’s method [18] in earlier publication [16]. Since this article, new methods also claimed for sub-pixel precision. Among them we retained the work of Trujilo-Pino (TP) [22, 21] which, based on an area estimate, is in some way close to the estimator (Eq. 29). For reference, we retained the well known Active Contours (AC) method [11].
AC | TP | |||
---|---|---|---|---|
case | ||||
D1 | ||||
D | ||||
D2 | ||||
D | ||||
D3 | ||||
D |
Table 2 shows the results obtained for the circular disc statistical study. With respect to TP method, the VIC (table 1) offers a gain in which increases with . In the realistic case D3, with pixels per curve parameter, the VIC is approximatively 6 times more precise than the TP method. The AC method gives worse results but still identifies a continuous contour in noisy images, on the contrary of TP method which required to remove aberrants points (farther than 0.5 pixel). Both TP and AC methods, like the majority of the existing contour detection methods, are local ones. On the contrary, the VIC benefits of the regularization associated to the curve , whose effect on the precision, from Eqs. (24, 32), increases with the curve length.
5 Conclusions
With a reliable expression of the uncertainty and a tool to estimate the relevance of the chosen curve family, the Virtual Image Correlation method has now reached maturity.
This article gives it a clarified theoretical framework and the sole parameter of the method, the virtual image width, is now fixed.
Relative interests between local and global methods are subjects of endless debates in the DIC community [1].
As expected, the VIC has the same advantages as the global DIC: accuracy and robustness to noise, but also shares its disadvantages: the necessity to choose an a priori field (DIC) or curve (VIC).
Furthermore the given measure does not consist in a set of pixels but in a continuous curve defined from a reduced set of shape parameters.
The initialization step required for the VIC can be helped by temporarily setting a wide virtual image width or by using one of the many existing detection method, for example the robust Active Contours method.
Remaining possible ameliorations of the VIC may consist in faster computational strategies and some work remain to be done in 3D.
The field of applications is wide, especially in experimental mechanics. The VIC can be used to measure object boundaries [6, 10], the shape of elongated objects (beam, trusses…) [3] and possibly compare these curves between free and strained states. The line of interest can also be a 2D [5] or 3D [14] crack or a physical front (chemical, thermal, hydric…) [7]. Recent developments concern the use of the VIC to improve the DIC’s precision close to the object borders [2].
Appendix A Relative magnitude of major terms
The relative magnitude of the terms in Eq. (11) are compared together in order to justify the use of the simplified Eq. (12). We suppose that, close to solution, . If , Eq. (18) can be expressed as:
(33) |
where denotes the dyadic (tensor) product. Then, the terms of interest in Eqs. (10, 11) can be rewritten in a separate form:
(34) | |||||
(35) | |||||
(36) | |||||

Integrals over , in correspondance with , depend upon (Eq. 2) and . According to Eq. (25), in an ideal case , and , thus: , if or if and if or else. Fig. 11 shows that as soon as , i.e as soon as the virtual image width is wide enough to cover the black to white transition in F. This result justifies the simplification from Eqs. (11, 12), as soon as the integrals over have comparable magnitudes.
Appendix B Intermediate calculations on the effet of image noise
Hypotheses of Sec. 3.1, Eqs. (19) and (21) lead to:
(37) |
Eqs. (3 to 15) give the differential surface element in the frame :
(38) |
Supposing a weak curvature we obtain:
(39) |
which gives the correspondance between the virtual image surfaces in the frame and in the frame . In the pixel frame, Eq. (37) corresponds to:
(40) |
where is the number of pixels involved in the virtual image calculus thus (the virtual image surface). From elementary statistics, we obtain the standard deviation:
(41) |
and Eq. (27) is deduced from this equation and the following correspondance between continuous and discrete expressions:
(42) |
References
- [1] Subset-based local vs. finite element-based global digital image correlation: A comparison study. Theoretical and Applied Mechanics Letters, 6(5):200–208, 2016.
- [2] Maxime Baconnais, Julien Réthoré, and Marc François. Improvement of the digital image correlation close to the object borders. Strain (proposed).
- [3] Alexis Bloch. Expérimentation et modélisation du comportement des structures gonflables complexes sous chargement climatique aléatoire. PhD thesis, Université de Nantes, 2015.
- [4] M. Bornert, P. Doumalin, J.-C. Dupré, C. Poilâne, L. Robert, E. Toussaint, and B. Wattrisse. Assessment of digital image correlation measurement accuracy in the ultimate error regime: Improved models of systematic and random errors. Experimental Mechanics, 58(1):33–48, 2018.
- [5] Marc Louis Maurice François. Monitoring of debonding or cracking in bending tests by virtual image correlation. In A. Chabot, W.G. Buttlar, E.V. Dave, C. Petit, and G. Tebaldi, editors, 8th RILEM Int. Conf. on Mechanisms on Cracking and Debonding in Pavements (MCD2016), Nantes, pages 739–748. Springer, 7-9 juin 2016.
- [6] Marc Louis Maurice François, Alexis Bloch, and Jean-Christophe Thomas. Metrology of contours by the virtual image correlation technique. In SEM, editor, Advancement of Optical Methods in Experimental Mechanics, volume 3, SEM 2015 Annual Conference and Exposition on Experimental and Applied Mechanics,, pages 239–246, Costa-Mesa, USA, 8–11 june 2015. SEM, Springer.
- [7] Marc Louis Maurice François, Benoit Semin, and Harold Auradou. Identification of the shape of curvilinear beams and fibers. Applied Mechanics and Materials, 24-25:359–364, 2010.
- [8] François Hild and Stéphane Roux. Digital image correlation: from displacement measurement to identification of elastic properties - a review. Strain, 42(2):69–80, 2006.
- [9] François Hild and Stéphane Roux. Measuring stress intensity factors with a camera: integrated digital image correlation (I-DIC). Comptes Rendus de Mécanique, 334:8–12, 2006.
- [10] Zhifan Jiang, Jean-François Witz, Pauline Lecomte-Grosbras, Jérémie Dequidt, Christian Duriez, Michel Cosson, Stéphane Cotin, and Mathias Brieu. B-spline based multi-organ detection in magnetic resonance imaging. Strain, 51:235–247, 2015.
- [11] Shawn Lankton. Active contour segmentation. MATLAB Central File Exchange.
- [12] Leslie Piegl and Wayne Tiller. A menagerie of rational B-spline circles. IEEE Computer Graphics and Applications, 9(5):48–56, 1989.
- [13] Julien Réthoré and Marc Louis Maurice François. Corrélation d’images pour la détection de contour. In Actes du 20e Congrès Français de Mécanique, Besançon, août 2011.
- [14] Julien Réthoré and Marc Louis Maurice François. Curve and boundaries measurement using B-splines and virtual images. Optics and Lasers in Engineering, 52:145–155, 2013.
- [15] Stéphane Roux and François Hild. Stress intensity factor measurements from digital image correlation: post-processing and integrated approaches. International Journal of Fracture, 140:141–157, 2006.
- [16] Benoit Semin, Harold Auradou, and Marc Louis Maurice François. Accurate measurement of curvilinear shapes by virtual image correlation. The European physical journal applied physics, 56:1–10, October 2011.
- [17] J.A. Sethian. Level Set Methods and Fast Marching Methods. Cambridge University Press, 1998.
- [18] C. Steger. An unbiased detector of curvilinear structures. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(2):113–125, 1998.
- [19] Yong Su, Qingchuan Zhang, Xiaohai Xu, and Zeren Gao. Quality assessment of speckle patterns for DIC by consideration of both systematic errors and random errors. Optics and Lasers in Engineering, 86:132–142, 2016.
- [20] Michael A. Sutton, Jean-José Orteu, and Hubert W. Schreier. Image Correlation for Shape, Motion and Deformation Measurements. Basic Concepts, Theory and Applications. Springer, 2009.
- [21] Agustín Trujillo-Pino. Accurate subpixel edge location. MATLAB Central File Exchange.
- [22] Agustín Trujillo-Pino, Karl Krissian, Miguel Alemán-Flores, and Daniel Santana-Cedrés. Accurate subpixel edge location based on partial area effect. Image and Vision Computing, 31:72–90, 2013.