Metadata-Version: 2.4
Name: dc-adb-images
Version: 0.0.2
Summary: ADB-based image and text automation utilities for Android devices
Author: Dai Chao Online
License: MIT
Keywords: adb android automation image-recognition ocr device-control
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: Pillow
Requires-Dist: pytesseract
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

## 📸 adb_images Module

The `adb_images` module provides advanced image and text automation features using ADB, OpenCV, and Tesseract OCR.  
It allows developers to capture screenshots, match UI elements visually, and interact with text on the screen.

---

### ✨ Features

- Capture device screenshots  
- Match and locate images on screen  
- Tap or long‑press on matched images  
- Preprocess screenshots for OCR  
- Extract and verify text using Tesseract  
- Tap on recognized text safely with retry protection  

---

### 📚 Installation

```bash
pip install dc-adb-images
```

### 🚀 Usage Example

```python
from adb_images.image_controller import ImageController
from adb_images.image_matcher import ImageMatcher
from adb_images.text_recognizer import TextRecognizer
from adb_images.text_tapper import TextTapper

# Initialize controllers
controller = ImageController(device_id="emulator-5554")
matcher = ImageMatcher(device_id="emulator-5554")
recognizer = TextRecognizer(device_id="emulator-5554", dir_path=r"C:\Config\Tesseract-OCR\tesseract.exe")
tapper = TextTapper(device_id="emulator-5554")

# Capture a screenshot
screenshot_path = controller.capture_screen()
print(f"Screenshot saved at: {screenshot_path}")

# Find and tap an image
coords = matcher.match_image("assets/target_button.png")
if coords:
    matcher.tap_point(*coords)

# Recognize and tap text
if recognizer.process_text("Login"):
    print("Login button tapped successfully")

# Tap text with preprocessing and safe retries
if tapper.process_text("Continue"):
    print("Continue tapped safely")
```
