Reads a FastTrack tracking result file (.txt format) and returns an
aniframe with keypoints for head, body, and tail positions.
FastTrack stores positions in image (top-left) coordinates; the
reader reflects y so the returned aniframe is in the conventional
bottom_left origin. The tracking file does not record the source
video resolution, so pass video_height to get an accurate flip —
otherwise max(y) is used as a fallback.
Value
An aniframe. time is FastTrack's imageNumber, with the first
frame of the video at 0; see "Time" in read_dataset().
References
Gallois, B., & Candelier, R. (2021). FastTrack: An open-source software for tracking varying numbers of deformable objects. PLOS Computational Biology, 17(2), e1008697. doi:10.1371/journal.pcbi.1008697 .
Examples
path <- system.file("extdata", "fasttrack.txt", package = "aniread")
read_fasttrack(path)
#> # Individuals: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
#> # Keypoints: centroid, head, tail
#> individual keypoint time x y area
#> <int> <fct> <dbl> <dbl> <dbl> <dbl>
#> 1 0 centroid 0 508. 2.24 78.5
#> 2 0 head 0 514. 0 NA
#> 3 0 tail 0 500. 5.39 NA
#> 4 1 centroid 0 458. 4.77 73
#> 5 1 head 0 464. 6.07 NA
#> 6 1 tail 0 450. 2.80 NA
#> 7 2 centroid 0 29.2 49.6 78
#> 8 2 head 0 24.0 45.4 NA
#> 9 2 tail 0 35.0 54.3 NA
#> 10 3 centroid 0 365. 102. 148.
#> # ℹ 20 more rows