About bevywebcamfacial

Plugin for Bevy game engine. Captures webcam image, finds face and provides all available data (face rectangle coordinates, its width and height, face probability) to Bevy game engine via events for further use in Bevy game engine.

Features

Supported Platforms

Available for use in Bevy:

Plugin config

Needs several parameters when including in .add_plugins: rust app.add_plugins(WebcamFacialPlugin { config_webcam_device: String, config_webcam_width: u32, config_webcam_height: u32, config_webcam_framerate: u32, config_webcam_autostart: bool, }); Parameters: * Path to webcamera device ex."/dev/video0" * Width of frame: 640 * Width of frame: 480 * Frames per second: 33 * Start capturing instantly after plugin activation: true/false (can be enabled anytime at runtime via WebcamFacialControl)

Resources:

Enable/disable webcam capture and recognition from Bevy via mutable Resource rust <ResMut>WebcamFacialControl bool

Event on data arival

rust <Event>WebcamFacialDataEvent

Data struct returned in Event

rust WebcamFacialData { center_x: i32, center_y: i32, x: i32, y: i32, width: i32, height: i32, score: f32, } * [centerx) Face center point x coordinate * (centery) Face center point y coordinate * (x) Face rectangle frame x coordinate * (y) Face rectangle frame y coordinate * (width) Face rectangle frame width * (height) Face rectangle frame height * (score) Probability of a detected object being a true face 0-30..

Usage in Examples:

Three examples are provided in [examples] folder:

Versions

| bevy | bevywebcamfacial | | ---:| ---:| | 0.11 | 0.1.0 |

Bevy tracking

Reference Material

The following were used for coding of plugin:

Additional interesting sources for future research:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.