1 2 3 4 5 6 7 8 9 10 11 12 13
use opencv::{ highgui, imgcodecs, Result, }; fn main() -> Result<()> { let image = imgcodecs::imread("lena.jpg", 0)?; highgui::named_window("hello opencv!", 0)?; highgui::imshow("hello opencv!", &image)?; highgui::wait_key(10000)?; Ok(()) }