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 *;
Early version of this had incredible speed during development. But as new features were added and simplicity introduced, started to slow down itself. Will release a branch of the original soon.
Benchmark
Python: 150ms Rust: 53ms (Both finding the Rust icon with a size of 225x225px on a 1920x1080 screen)
Useful for Bot Creating