Struct rustml::opencv::Window [] [src]

pub struct Window {
    // some fields omitted
}

A window to display an image.

Methods

impl Window

fn new() -> Window

Creates a new window for displaying an image.

fn show_image<T: Image>(&self, img: &T) -> &Self

Displays the given image in the window.

use rustml::opencv::*;

let img = RgbImage::from_file("datasets/testing/tree.png").unwrap();
Window::new()
    .show_image(&img)
    .wait_key();

fn wait(&self, delay: i32) -> &Self

Waits for the specified amount of time in milliseconds.

fn wait_key(&self) -> &Self

Waits until a key is pressed.

fn destroy(&self)