📄 Images from Document
Extract embedded photos from scanned documents. For .docx files, extracts embedded images directly via python-docx. For .doc/.docm files, first converts the document to PDF via LibreOffice in headless mode. Converts each PDF page to a raster image, detects photo regions via contour analysis, OCRs the caption area below each photo, and saves cropped images as JPEGs with EXIF metadata containing the caption. Typical input: scanned property documentation with inline photographs (e.g. "Documentazione Fotografica" from Italian real-estate dossiers).
Template Information
- Workflow ID
images_from_document_v1- Version
- 1.0.0
- Status
- Active
- Author
- AECS4U Ocular Team
- Created
- N/A
- Steps
- 1
- Tags
- extraction images photos pdf word ocr tesseract real-estate v1
Input Schema
file_path- str
output_dir- str
Instance Presets
0No instances defined for this template
Workflow Flowchart
Workflow Steps
- Step ID
extract_images- Processor Type
- python
- Timeout
- 600s
- Max Retries
- 2
- Retry on Failure
- Yes
- Cache Results
- Yes
Input Mapping
| Target Parameter | Source Value |
|---|---|
file_path |
file_path |
output_dir |
output_dir |