SpectRust
A Rust-based Computer visioner for locating images on screen
It can search the entire screen a over 3x faster than pyautogui and does not require OpenCV for options like Confidence. I've also added an option called Tolerance that allows for leniency with pixel colors that are close to the original image's. Written in pure Rust.
locate_img_center )
locate_img
img: required borrowed DynamicImage
region: requires tuple BoundingBox (x, y, width, height) (Default Entire Screen)
min_confidence: 0.1 - 1.0, percentage of how many of the pixels need to match (Default 0.95)
tolerance: 0 - 255, range of pixels to accept from image's pixels. So if an image has a pixel of 234, 52, 245 with a tolerance of 10, then the locator will accept values ranging from 224, 42, 235 - 244, 62, 255. (Default 5)
All of these requires (except img) are optional and require either a Some() or None
Examples:
use *;
If you are having trouble with finding an image. Try lowering the confidence or increasing the tolerance.
Benchmark
Python: 150ms Rust: 53ms (Both finding the Rust icon with a size of 225x225px on a 1920x1080 screen)
Useful for Bot Creating