From 70ecdd758c114d4664f2c8e2aa60364c777785a8 Mon Sep 17 00:00:00 2001 From: Varga Marcell <128537619+marci1175@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:24:03 +0200 Subject: [PATCH] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ee87411..f2cde15 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,13 @@ - ## Support: Despite the name this crate can be used on all platforms supported by [OpenCV](https://crates.io/crates/opencv). - ## Example: - Create a new Webcam instance, and retrive an image in the form of raw bytes: \ No newline at end of file + Create a new Webcam instance, and retrive an image in the form of raw bytes: + ```rust + //Crate webcam handle + let mut webcam = Webcam::new_def_auto_detect().unwrap(); + + //Get raw image bytes + let raw_image_bytes = webcam.get_frame().unwrap(); + + //Handle bytes . . . + ```