# for a photo
au.photos <- c(
"AU1/AU5/AU9",
"AU1/AU2",
"AU1/AU2/AU10",
"AU1/AU2",
"AU5/AU17/AU18",
"AU6/AU12"
)
au.names <- c("photo1", "photo2", "photo3", "photo4", "photo5", "photo6")
au.prepared <- prepare.netfacs(
elements = au.photos,
type = "photo",
video.id = au.names,
separator = "/"
)
au.prepared$element.matrix
au.prepared$video.info
# for a video
aus <- c(
"AU1", "AU5", "AU9",
"AU1", "AU2",
"AU1", "AU2", "AU10",
"AU1", "AU2",
"AU5", "AU17", "AU18",
"AU6", "AU12"
)
video.names <- c(
rep("video1", 3),
rep("video2", 2),
rep("video3", 3),
rep("video4", 2),
rep("video5", 3),
rep("video6", 2)
)
start.times <- c(
0.1, 0.2, 0.3,
0.1, 0.3,
0.1, 0.4, 0.4,
0.1, 0.2,
0.1, 0.5, 0.6,
0.1, 0.2
)
durations <- rep(0.3, times = length(start.times))
frame.dur <- 0.05
au.prepared <- prepare.netfacs(
elements = aus,
type = "video",
video.id = video.names,
start.time = start.times,
duration = durations,
frame.duration = frame.dur
)
head(au.prepared$element.matrix)
head(au.prepared$video.info)
Run the code above in your browser using DataLab