{"id":19032828,"url":"https://github.com/nomadsdev/veil-sight-python","last_synced_at":"2025-04-23T16:41:59.740Z","repository":{"id":254942932,"uuid":"848040881","full_name":"nomadsdev/veil-sight-python","owner":"nomadsdev","description":"VeilSight is a tool for automating window detection, image recognition, and text extraction on Windows, designed to boost productivity by simplifying repetitive tasks.","archived":false,"fork":false,"pushed_at":"2024-09-13T00:16:34.000Z","size":126,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T02:45:23.332Z","etag":null,"topics":["automation","image-processing","ocr","opencv","pyautogui","python","template-matching","tesseract","veil-sight","veil-sight-python","win32api","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomadsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-27T02:46:46.000Z","updated_at":"2024-09-13T00:16:37.000Z","dependencies_parsed_at":"2024-08-27T04:14:33.656Z","dependency_job_id":"0b3e5efa-8792-4e14-8a7e-b4949766c426","html_url":"https://github.com/nomadsdev/veil-sight-python","commit_stats":null,"previous_names":["nomadsdev/veil-sight-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomadsdev%2Fveil-sight-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomadsdev%2Fveil-sight-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomadsdev%2Fveil-sight-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomadsdev%2Fveil-sight-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomadsdev","download_url":"https://codeload.github.com/nomadsdev/veil-sight-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250472042,"owners_count":21436070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","image-processing","ocr","opencv","pyautogui","python","template-matching","tesseract","veil-sight","veil-sight-python","win32api","windows"],"created_at":"2024-11-08T21:31:49.205Z","updated_at":"2025-04-23T16:41:59.724Z","avatar_url":"https://github.com/nomadsdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VeilSight\n\n**VeilSight** is a versatile automation tool designed to enhance productivity on Windows by automating repetitive tasks. It offers advanced capabilities for window detection, image recognition, and text extraction, making it an ideal solution for streamlining workflows.\n\n## Features\n\n- **Window Detection**: Accurately locate and interact with specific windows using titles defined in a configuration file. Supports both exact and partial title matching.\n- **Screen Image Search**: Efficiently search for specific images on your screen using multi-scale and Gaussian blur techniques to enhance accuracy.\n- **Text Extraction**: Extract text from images using Tesseract OCR with support for multiple languages, including English and Thai.\n- **Multi-Window Support**: Manage multiple windows simultaneously, facilitating automation across various applications.\n- **Configurable Settings**: Customize window titles, image folder paths, and OCR language preferences via a `config.ini` file.\n- **Robust Error Handling**: Comprehensive error management ensures smooth operation even in the face of issues like missing files or invalid configurations.\n- **User-Friendly Interaction**: Select specific images for processing or opt to search all images within a designated folder.\n- **Detailed Logging**: Track actions and errors through comprehensive logging for easier troubleshooting and review.\n- **Optimized Performance**: Utilize multi-threading for efficient processing of multiple images simultaneously.\n\n## Installation\n\n### 1. Install Required Libraries\n\nEnsure all dependencies are installed by running:\n\n```bash\npip install pywin32 opencv-python numpy pyautogui pytesseract\n```\n\n### 2. Install Tesseract OCR\n\nDownload and install Tesseract OCR from [Tesseract OCR GitHub](https://github.com/tesseract-ocr/tesseract). After installation:\n\n- Add Tesseract's installation path to your `PATH` environment variable to ensure it can be called from anywhere.\n\n## Configuration\n\n### 1. Create or Edit the Configuration File\n\nCreate a `config.ini` file in the project directory to specify window titles, image folder paths, and OCR settings. Example configuration:\n\n```ini\n[Settings]\nimage_folder = image/\nconfig_file = config.txt\nocr_language = eng+tha\n```\n\n### 2. Organize Your Images\n\nPlace the images you intend to search for within the folder specified in the `config.ini` file (default is `image/`).\n\n## Usage\n\n### 1. Run the Script\n\nExecute the script using Python:\n\n```bash\npython main.py\n```\n\n### 2. Image Selection\n\nYou will be prompted to select images for searching. Enter the corresponding numbers to select specific images or enter `0` to select all images in the folder.\n\n### 3. OCR Language Selection\n\nChoose the OCR language for text extraction, as specified in the `config.ini` file.\n\n## Project Structure\n\n- **`main.py`**: The core script that manages window detection, image searching, and text extraction.\n- **`config.ini`**: Configuration file where you define window titles, image folder paths, and OCR settings.\n- **`image/`**: Directory containing images to be used for screen searches.\n- **`result_saver.py`**: Contains functions for saving search results to a CSV file.\n- **`file_manager.py`**: Manages file operations such as reading lines and listing images.\n- **`config_manager.py`**: Handles loading and validating the configuration file.\n- **`window_manager.py`**: Manages window detection and interaction.\n- **`image_processing.py`**: Contains functions for image searching and text extraction.\n\n## Detailed Functions\n\n- **Window Detection**: `find_window(title: str, exact_match: bool = True) -\u003e Path` locates a window by its title with options for exact or partial matching.\n- **Configuration Reading**: `load_config(file_path: str) -\u003e Optional[configparser.ConfigParser]` reads settings from the `config.ini` file.\n- **Image Search**: `find_image_on_screen(image_path: str, threshold: float = 0.8) -\u003e bool` searches for an image on the screen with multi-scale support and image processing for increased accuracy.\n- **Text Extraction**: `extract_text_from_image(image_path: str, language: str = 'eng') -\u003e str` extracts text from images using Tesseract OCR.\n- **Result Logging**: `save_results(results: list, output_file: str = 'results.csv') -\u003e None` saves search results, including image locations and extracted text, to a CSV file.\n\n## Development\n\nTo extend or customize VeilSight:\n\n- **Window Interaction**: Enhance `find_window` to support more complex scenarios, such as interacting with multiple instances of the same application.\n- **Image Processing**: Improve `find_image_on_screen` by experimenting with different image matching techniques, such as edge detection or feature matching.\n- **OCR Customization**: Modify `extract_text_from_image` to better suit specific OCR tasks or to add support for additional languages.\n- **Advanced Configuration**: Expand the `config.ini` to include more parameters, such as custom image processing options or additional window search criteria.\n- **Optimized Performance**: Enhance multi-threading capabilities and explore additional optimization techniques to handle larger image datasets more efficiently.\n\n## Support\n\nFor help, bug reports, or feature requests, please use the GitHub Issues page or contact the developer via email.\n\n## License\n\nVeilSight is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomadsdev%2Fveil-sight-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomadsdev%2Fveil-sight-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomadsdev%2Fveil-sight-python/lists"}