Align shape along their longer axis using var-cov matrix and eigen values.

coo_align(x, from_col = coo, to_col = coo, ...)

coo_align_xax(x, from_col, to_col, ...)

Arguments

x

coo_single, coo_list or mom_tbl

from_col

colnames from where to get the coo_list and how to name the resulting one (only for mom_tbl method)

to_col

colnames from where to get the coo_list and how to name the resulting one (only for mom_tbl method)

...

useless here

Value

a coo_single, coo_list or mom_tbl

Details

(todo) For coo_align_xax: ff some shapes are upside-down (or mirror of each others), try redefining a new starting point (eg with coo_slidedirection) before the alignment step. This may solve your problem because coo_calliper orders the `$arr.ind`` used by coo_aligncalliper.

Functions

  • coo_align_xax: align the longest axis of the shape along the x-axis

See also

Examples

bot %>% pick(1) %>% coo_align
#> # A tibble: 138 x 2 #> x y #> <dbl> <dbl> #> 1 561. 43.3 #> 2 540. 46.0 #> 3 529. 45.9 #> 4 507. 48.7 #> 5 486. 51.5 #> 6 476. 53.3 #> 7 455. 57.1 #> 8 434. 58.9 #> 9 413. 61.6 #> 10 402. 63.5 #> # … with 128 more rows #> ❯coo_single with 138 coordinates
bot %>% pick(1) %>% coo_align_xax
#> # A tibble: 138 x 2 #> x y #> <dbl> <dbl> #> 1 561. -138. #> 2 540. -135. #> 3 529. -135. #> 4 507. -132. #> 5 486. -130. #> 6 476. -128. #> 7 455. -124. #> 8 434. -122. #> 9 413. -120. #> 10 402. -118. #> # … with 128 more rows #> ❯coo_single with 138 coordinates