* Move everything into package * Remove .DS_Store * Move scripts and eslintrc to package * Create CODE_OF_CONDUCT.md * fix some links * Update all links (I think) * Update generated docs * Update notice-yarn-changes.yml * Update validate-android.yml * Update validate-cpp.yml * Delete notice-yarn-changes.yml * Update validate-cpp.yml * Update validate-cpp.yml * Update validate-js.yml * Update validate-cpp.yml * Update validate-cpp.yml * wrong c++ style * Revert "wrong c++ style" This reverts commit 55a3575589c6f13f8b05134d83384f55e0601ab2.
2.1 KiB
2.1 KiB
id | title | sidebar_position | custom_edit_url |
---|---|---|---|
Frame | Frame | 0 | null |
A single frame, as seen by the camera.
Properties
bytesPerRow
• bytesPerRow: number
Returns the amount of bytes per row.
Defined in
height
• height: number
Returns the height of the frame, in pixels.
Defined in
isValid
• isValid: boolean
Whether the underlying buffer is still valid or not. The buffer will be released after the frame processor returns, or close()
is called.
Defined in
planesCount
• planesCount: number
Returns the number of planes this frame contains.
Defined in
width
• width: number
Returns the width of the frame, in pixels.
Defined in
Methods
close
▸ close(): void
Closes and disposes the Frame. Only close frames that you have created yourself, e.g. by copying the frame you receive in a frame processor.
Example
const frameProcessor = useFrameProcessor((frame) => {
const smallerCopy = resize(frame, 480, 270)
// run AI ...
smallerCopy.close()
// don't close `frame`!
})
Returns
void
Defined in
toString
▸ toString(): string
Returns a string representation of the frame.
Example
console.log(frame.toString()) // -> "3840 x 2160 Frame"
Returns
string