1. Ensure that you have the following tools installed:
git clone <https://github.com/microsoft/vcpkg.git>
cd vcpkg

REM Build vcpkg executable
.\\bootstrap-vcpkg.bat

REM Install OpenCV using vcpkg
.\\vcpkg install opencv[core]

Replace C:\\path\\to\\vcpkg and <YourUsername> with the appropriate paths for your system.

set VCPKG_ROOT=C:\\path\\to\\vcpkg

REM Enable dynamic linking for vcpkg
set VCPKGRS_DYNAMIC=1

REM Optionally, add Cargo to the PATH if it's not already there
set PATH=%PATH%;C:\\Users\\<YourUsername>\\.cargo\\bin
cargo new my_project
cd my_project
cargo build
use opencv::{
    core::Mat,
    imgcodecs,
    prelude::*,
    Result,
};

fn main() -> Result<()> {
    let image = imgcodecs::imread("test.jpg", imgcodecs::IMREAD_COLOR)?;
    println!("Image loaded: {} x {}", image.rows(), image.cols());
    Ok(())
}

cargo run