Marc Rousavy 036856aed5
chore: Move everything into package/ (#1745)
* 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.
2023-09-01 18:15:28 +02:00

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

Frame.ts:20


height

height: number

Returns the height of the frame, in pixels.

Defined in

Frame.ts:16


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

Frame.ts:8


planesCount

planesCount: number

Returns the number of planes this frame contains.

Defined in

Frame.ts:24


width

width: number

Returns the width of the frame, in pixels.

Defined in

Frame.ts:12

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

Frame.ts:48


toString

toString(): string

Returns a string representation of the frame.

Example

console.log(frame.toString()) // -> "3840 x 2160 Frame"

Returns

string

Defined in

Frame.ts:33