Single Point Motion
Consider a single point , fixed to a physical location on the object being imaged. In the reference image , this point is located at a known pixel location, for example pixels. This vector, from the origin of the reference image frame to the pixel point , locates the reference configuration. For brevity, we will use to denote the fully explicit vector .
Next, the object is moved (e.g., translated, rotated, stretched, or deformed — see Image Transformation). A second image , called the current image, is taken. Where is point from located in ? We label point 's found location in as . For brevity, we will use to denote the fully explicit vector .
Note that the camera itself has not moved, only the object and any point of interest on the object have moved. The origin and the reference frame are the same across the two images and .
The canonical problem solved by digital image correlation (DIC) is as follows:
- Given a point in image , find the location of that same point in image .
Below, we motivate this canonical problem with a simple example of a single
point translation. We first develop a manual solution to serve as the known
ground truth. Then, we illustrate how
dictk.translation.locate
solves this problem numerically via DIC.
Reference Configuration
The examples below reuse checkerboard0, the speckle pattern combined
with the checkerboard introduced in Image
Generation. This will be the
reference_image, matching locate's own parameter name:
from dictk.image import read, PixelCoordinate
from dictk.plot import point_plot, ArrowAnnotation
reference_image = read(path="checkerboard0.png")
p0 = PixelCoordinate(x=100, y=75)
point_plot(
image=reference_image,
arrows=[
ArrowAnnotation(
tail=PixelCoordinate(x=0, y=0), head=p0, color="orange", label=r"$\boldsymbol{p}_0$"
)
],
figsize=(6.4, 4.8),
path="single_point_motion_p0.png",
)
Saved: single_point_motion_p0.png
Current Configuration and Displacement
For this page, the current image is generated with
dictk.image.translate (see Image
Transformation): every pixel of
reference_image shifts by the same (dx, dy), a rigid-body
translation. Because the whole
image moves together, point 's new location follows directly:
from dictk.image import translate
dx, dy = -6, 8
current_image = translate(arr=reference_image, dx=dx, dy=dy)
p1 = PixelCoordinate(x=p0.x + dx, y=p0.y + dy) # ground truth, known here by construction
We define the displacement of the point as the relative motion between the reference configuration and the current configuration , such that
so with and ,
point_plot(
image=current_image,
arrows=[
ArrowAnnotation(
tail=PixelCoordinate(x=0, y=0), head=p0, color="orange", label=r"$\boldsymbol{p}_0$"
),
ArrowAnnotation(
tail=PixelCoordinate(x=0, y=0), head=p1, color="cyan", label=r"$\boldsymbol{p}_1$"
),
ArrowAnnotation(
tail=p0, head=p1, color="magenta", label=r"$\delta \boldsymbol{p}$"
),
],
figsize=(6.4, 4.8),
path="single_point_motion_p1_displacement.png",
)
Saved: single_point_motion_p1_displacement.png
In the example above, p1 was only known in advance because we generated
current_image ourselves with a known translate. In practice, the
location is unknown and found via DIC of a pair of images.
Below, we illustrate the canonical DIC process:
- Given a in the
reference_image, find in thecurrent_image.
The next page, Cross Correlation (CC), shows how the
locate function calculates directly, using the
technique its name describes.