calibrationParameters | R Documentation |
Adapted from some old Python code. This will return a list of 12 parameters that can be used to convert new measuerements in the same coordinate system used in Mcoords to coordinates in the coordinate system used in Tcoords. This is use in some eye-trackers, but can also be used for old fashioned touch screens that sometimes return warped.
calibrationParameters(Mcoords, Tcoords)
Mcoords |
A data frame with columns of x and y measurements |
Tcoords |
A data frame with target coordinates in columns x and y. |
Not yet.
Parameter weights for a 12 term linear model.
data("localization_aligned") str(localization_aligned) # let's see if we can convert the touch screen pixels to (centi)meters train <- localization_aligned[c(1:16),] test <- localization_aligned[c(17:24),] trainTaps <- train[,which(names(train) %in% c('tapx_px', 'tapy_px'))] names(trainTaps) <- c('x','y') trainHand <- train[,which(names(train) %in% c('handx_m', 'handy_m'))] names(trainHand) <- c('x','y') calibrationParameters(trainTaps,trainHand)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.