class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCounted CameraFeed
A camera feed gives you access to a single physical camera attached to your device.

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.

Signal format_changed<>():Signal

Emitted when the format has changed.

Signal frame_changed<>():Signal

Emitted when a new frame is available.

Enum FeedDataType<>():Enum

FEED_NOIMAGE = 0

No image set for the feed.


FEED_RGB = 1

Feed supplies RGB images.


FEED_YCBCR = 2

Feed supplies YCbCr images that need to be converted to RGB.


FEED_YCBCR_SEP = 3

Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.


FEED_EXTERNAL = 4

Feed supplies external image.

Enum FeedPosition<>():Enum

FEED_UNSPECIFIED = 0

Unspecified position.


FEED_FRONT = 1

Camera is mounted at the front of the device.


FEED_BACK = 2

Camera is mounted at the back of the device.

bool feed_is_active<>():bool

If true, the feed is active.

Transform2D feed_transform<>():Transform2D

The transform applied to the camera's image.

Array formats<>():Array

Formats supported by the feed. Each entry is a Dictionary describing format parameters.

bool _activate_feed<>():bool

Called when the camera feed is activated.

void _deactivate_feed<>():void

Called when the camera feed is deactivated.

FeedDataType get_datatype<>():FeedDataType

Returns feed image data type.

int get_id<>():int

Returns the unique ID for this feed.

String get_name<>():String

Returns the camera's name.

FeedPosition get_position<>():FeedPosition

Returns the position of camera on the device.

int get_texture_tex_id<>( FeedImage feed_image_type=, feed_image_type:FeedImage=, ):int

Returns the texture backend ID (usable by some external libraries that need a handle to a texture to write data).

void set_external<>( int width=, width:int=, int height=, height:int=, ):void

Sets the feed as external feed provided by another library.

bool set_format<>( int index=, index:int=, Dictionary parameters=, parameters:Dictionary=, ):bool

Sets the feed format parameters for the given index in the formats array. Returns true on success. By default YUYV encoded stream is transformed to FEED_RGB. YUYV encoded stream output format can be changed with parameters.output value:

separate will result in FEED_YCBCR_SEP

grayscale will result in desaturated FEED_RGB

copy will result in FEED_YCBCR

void set_name<>( String name=, name:String=, ):void

Sets the camera's name.

void set_position<>( FeedPosition position=, position:FeedPosition=, ):void

Sets the position of this camera.

void set_rgb_image<>( Image rgb_image=, rgb_image:Image=, ):void

Sets RGB image for this feed.

void set_ycbcr_image<>( Image ycbcr_image=, ycbcr_image:Image=, ):void

Sets YCbCr image for this feed.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...