Outdated documentation
This documentation page refers to Godot
4.3,
and may be outdated or incorrect.
Additionally, this engine version is
no longer supported.
Check this page in the stable branch for the latest additions and corrections.
CameraFeed
Inherits: RefCounted < Object
A camera feed gives you access to a single physical camera attached to your device.
Description
A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also CameraServer.
Note: Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
Properties
|
||
|
Methods
get_datatype() const |
|
get_id() const |
|
get_name() const |
|
get_position() const |
Enumerations
enum FeedDataType: 🔗
FeedDataType FEED_NOIMAGE = 0
No image set for the feed.
FeedDataType FEED_RGB = 1
Feed supplies RGB images.
FeedDataType FEED_YCBCR = 2
Feed supplies YCbCr images that need to be converted to RGB.
FeedDataType FEED_YCBCR_SEP = 3
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
enum FeedPosition: 🔗
FeedPosition FEED_UNSPECIFIED = 0
Unspecified position.
FeedPosition FEED_FRONT = 1
Camera is mounted at the front of the device.
FeedPosition FEED_BACK = 2
Camera is mounted at the back of the device.
Property Descriptions
If true, the feed is active.
Transform2D feed_transform = Transform2D(1, 0, 0, -1, 0, 1) 🔗
void set_transform(value: Transform2D)
Transform2D get_transform()
The transform applied to the camera's image.
Method Descriptions
FeedDataType get_datatype() const 🔗
Returns feed image data type.
Returns the unique ID for this feed.
Returns the camera's name.
FeedPosition get_position() const 🔗
Returns the position of camera on the device.