[][src]Function opencv::viz::get_window_by_name

pub fn get_window_by_name(window_name: &str) -> Result<Viz3d>

Retrieves a window by its name.

Parameters

  • window_name: Name of the window that is to be retrieved.

This function returns a Viz3d object with the given name.

Note: If the window with that name already exists, that window is returned. Otherwise, new window is created with the given name, and it is returned.

Note: Window names are automatically prefixed by "Viz - " if it is not done by the user.

This example is not tested
/// window and window_2 are the same windows.
viz::Viz3d window   = viz::getWindowByName("myWindow");
viz::Viz3d window_2 = viz::getWindowByName("Viz - myWindow");