#bevy #rtsp #light-field

bin+lib bevy_light_field

rust bevy light field array tooling

7 releases (breaking)

0.8.0 Mar 18, 2024
0.5.0 Mar 11, 2024
0.4.0 Mar 11, 2024
0.3.0 Mar 8, 2024
0.1.0 Mar 7, 2024

#839 in Game dev

Download history 478/week @ 2024-03-05 174/week @ 2024-03-12 52/week @ 2024-03-19 7/week @ 2024-03-26 73/week @ 2024-04-02

377 downloads per month

MIT license

115KB
3K SLoC

bevy_light_field 💡🌾📷

test GitHub License crates.io

rust bevy light field camera array tooling

capabilities

  • grid view of light field camera array
  • stream to files with recording controls
  • person segmentation post-process (batch across streams)
  • async segmentation model inference
  • foreground extraction post-process and visualization mode
  • recording session viewer
  • camera array calibration (extrinsics, intrinsics, color)
  • camera position visualization
  • 3d reconstruction dataset preparation
  • real-time 3d reconstruction viewer

run the viewer

cargo run -- --help

the viewer opens a window and displays the light field camera array, with post-process options

see execution provider bevy_ort documentation for better performance

  • windows: cargo run --release --features "ort/cuda"

controls

  • r to start recording
  • s to stop recording
  • esc to exit
  • UI controls

library usage

use bevy::prelude::*;

use bevy_light_field::{
    LightFieldPlugin,
    stream::RtspStreamHandle,
};

fn main() {
    App::new()
        .add_plugins((
            DefaultPlugins,
            LightFieldPlugin {
                stream_config: "assets/streams.json",
            },
        ))
        .add_systems(Startup, setup_ui_gridview)
        .run();
}

fn setup_ui_gridview(
    mut commands: Commands,
    input_streams: Query<(
        Entity,
        &RtspStreamHandle,
    )>,
) {
    let stream = input_streams.single().unwrap();

    commands.spawn(ImageBundle {
        style: Style {
            width: Val::Percent(100.0),
            height: Val::Percent(100.0),
            ..default()
        },
        image: UiImage::new(stream.image.clone()),
        ..default()
    });

    commands.spawn((
        Camera2dBundle {
            ..default()
        },
    ));
}

light field camera array

view the onshape model

  • parts list

Alt text

compatible bevy versions

bevy_light_field bevy
0.1.0 0.13

credits

license

This software is dual-licensed under the MIT License and the GNU General Public License version 3 (GPL-3.0).

You may choose to use this software under the terms of the MIT License OR the GNU General Public License version 3 (GPL-3.0), except as stipulated below:

The use of the yolo_v8 feature within this software is specifically governed by the GNU General Public License version 3 (GPL-3.0). By using the yolo_v8 feature, you agree to comply with the terms and conditions of the GPL-3.0.

For more details on the licenses, please refer to the LICENSE.MIT and LICENSE.GPL-3.0 files included with this software.

Dependencies

~68–110MB
~2M SLoC