Welcome to AutoCV

AutoCV is an innovative computer vision library that simplifies image processing and analysis. With a focus on ease of use and flexibility, AutoCV enables rapid development of computer vision applications.

Features

  • Easy-to-use interface

  • Comprehensive image processing functions

  • High performance with real-time capabilities

  • Extensive documentation

Quick Start

To get started with AutoCV, install the package using pip:

pip install autocv

Prerequisites

  • Autocv requires Python 3.10+

  • Install Google Tesseract OCR (additional info how to install the engine on Windows). You must be able to invoke the tesseract command as tesseract. If this isn’t the case, for example because tesseract isn’t in your PATH, you will have to change the “tesseract_cmd” variable pytesseract.pytesseract.tesseract_cmd.

  • Note: In some rare cases, you might need to additionally install tessconfigs and configs from tesseract-ocr/tessconfigs if the OS specific package doesn’t include them.

Reading the Documentation

The class structure and inheritance within the documentation is organized as follows:

  • AutoCV

    • Inherits from:

      • Input

        • Which in turn inherits from:

          • Vision

            • Which finally inherits from:

              • WindowCapture

This means that the AutoCV class has access to all methods and properties of the classes it inherits from. The documentation is structured to reflect this hierarchy, grouping functions by their respective class to facilitate easier reading and understanding.

Example

from autocv import AutoCV


# initialize AutoCV class
autocv = AutoCV()

# set handle
autocv.set_hwnd_by_title("RuneLite")

# set inner handle recursively
while autocv.set_inner_hwnd_by_title("SunAwtCanvas"):
    pass

 # re-write memory to disable getCursorPos
autocv.antigcp()

# refresh (or in this case, set) the backbuffer image
autocv.refresh()

# find the first green contour with an area over 50 and a tolerance of 50
contour = autocv.find_contours((0, 255, 0), tolerance=50, min_area=50).first()

#  move and click the mouse to a random point in the contour
autocv.move_mouse(*contour.random_point())
autocv.click_mouse()