Frame
A Frame
is a single frame from a video on which Guru can perform inference. By default, it is passed into as a parameter into the process function of any Guru Schema.
findObjects
* Find objects of a specific type within the video.
*
* @param {string or array of strings} objectTypes - The type of the object to find.
* Can either be a string, in which case objects of a single type will be found, or an array of strings, in which case multiple object types will be found.
* @param {Object} attributes - The attributes of the object.
* @param {boolean} keypoints - Flag indicating whether to include keypoints in the results. Defaults to true.
* @return {List} A list of VideoObject instances matching the given criteria.
*/
async findObjects(objectTypes, { attributes = {}, keypoints = true } = {}) {
FrameObject
A FrameObject
is a single object present within a particular frame or image.
* A single object present within a particular frame or image.
*/
export class FrameObject {
* @param {string} objectId - The id of the object.
* @param {string} objectType - The type of the object.
* @param {number} timestamp - The timestamp of the frame.
* @param {Box} boundary - The bounding box of the object, defining its location within the frame.
* @param {Object.<string, Position>} keypoints - A map of the name of a keypoint, to its location within the frame.
*/
keypointLocation
* Get the location of a keypoint for the object at this frame.
*
* @param keypointName The name of the keypoint whose location will be fetched.
* @returns {Position|undefined} The position of the keypoint, or undefined if unknown.
*/
keypointLocation(keypointName) {