A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cran.r-project.org/web/packages/multimolang/vignettes/dfMaker-Details.html below:

dfMaker Details

The function depends on the arrow package for efficient reading and writing of JSON and Parquet files. Make sure you have it installed:

Linear Transformation in dfMaker()

The dfMaker() function applies a linear transformation to normalize and align keypoints data within a custom coordinate system. This transformation standardizes poses across different frames or individuals by defining specific keypoints as the origin and base vectors.

Fast Scaling Mode (fast_scaling = TRUE)

When fast_scaling = TRUE, the transformation is simplified and uses only the pose keypoints (the first set of keypoints). This results in faster computation since it avoids extra references.

Steps:

  1. Define the Origin (o_point):

  2. Calculate the Primary Base Vector (\(\mathbf{v_i}\)):

  3. Compute the Scaling Factor (s):

  4. Apply the Transformation:

Summary Equation:

\[ \begin{cases} x' = \dfrac{x - x_{\text{origin}}}{s} \\ y' = -\dfrac{y - y_{\text{origin}}}{s} \end{cases} \]

Full Transformation Mode (fast_scaling = FALSE)

When fast_scaling = FALSE, the transformation uses both primary and secondary base vectors to perform a full affine transformation, which can handle rotations and scaling in both axes.

Additional Steps:

  1. Calculate the Secondary Base Vector (\(\mathbf{v_j}\)):

  2. Construct the Transformation Matrix (\(M_t\)):

    \[ M_t = \begin{pmatrix} v_{i,x} & v_{j,x} \\ v_{i,y} & v_{j,y} \end{pmatrix} \]

  3. Compute the Inverse Transformation Matrix (\(M_t^{-1}\)) Using Cramer’s Rule:

  4. Apply the Transformation:

Example Applied in the Function

Using transformation_coords = c(1, 1, 5, 5) and fast_scaling = TRUE:

\[ \begin{cases} x' = \dfrac{x - x_{\text{origin}}}{v_{i,x}} \\ y' = -\dfrac{y - y_{\text{origin}}}{v_{i,x}} \end{cases} \]

Implications:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4