Camera OCR
Performs OCR on camera photos with advanced image enhancement and preprocessing using ABBYY FineReader Engine.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Path - Path to the input image file captured from camera or smartphone.
- Out Path - Path where the processed output image will be saved.
Options
- Language - Language for OCR recognition (default: English). Set to "_" to skip text recognition and only perform image enhancement.
- Noise Model - Noise reduction model to apply (default: none "_"). Options:
- None (_) - Skip noise removal
- NMM_NoisyImage - For noisy or grainy images
- NMM_BlurredImage - For blurred images
- NMM_NoisyBlurredImage - For both noisy and blurred images
- Crop Image - Whether to automatically crop the image to content area (default: false).
- Correct Orientation - Whether to automatically detect and correct image orientation (default: true).
- Correct Geometrical Distortions - Whether to correct perspective and geometrical distortions (default: true).
- Deskew Image - Whether to straighten skewed images (default: true).
- Has Large Characters - Whether the image contains large font characters to optimize recognition (default: false).
- Remove Motion Blur - Whether to reduce motion blur from camera movement (default: true).
- Make White Background - Whether to normalize background to white color (default: true).
Outputs
- Statistics - Recognition statistics object containing processing time, quality metrics, and processed images.
How It Works
The Camera OCR node enhances camera-captured images and performs OCR. When executed, the node:
- Validates the input file exists
- Configures processing settings based on options
- Warms up the processor engine
- Processes the image with selected enhancements:
- Crop to content area
- Correct orientation
- Fix geometric distortions
- Deskew the image
- Remove noise
- Reduce motion blur
- Normalize background
- Optionally performs OCR if language is specified
- Saves enhanced image(s) to output path
- Returns processing statistics
Requirements
- Valid ABBYY FineReader Engine installation
- Valid ABBYY license
- Input image file from camera or smartphone
- Output directory must exist and be writable
Error Handling
The node will return specific errors in the following cases:
ErrNotFound- Input image file not found. Error message includes the path.
Usage Example
Scenario: Enhance and OCR a smartphone photo of a document
Camera OCR node:
- Path: "C:/photos/receipt.jpg"
- Out Path: "C:/enhanced/receipt_clean.jpg"
- Language: English
- Noise Model: NMM_NoisyImage
- Crop Image: true
- Correct Orientation: true
- Correct Geometrical Distortions: true
- Deskew Image: true
- Has Large Characters: false
- Remove Motion Blur: true
- Make White Background: true
Scenario: Only enhance image without OCR
Camera OCR node:
- Path: "C:/photos/document.jpg"
- Out Path: "C:/enhanced/document_clean.jpg"
- Language: _ (skip OCR)
- Correct Orientation: true
- Deskew Image: true
- Remove Motion Blur: true
- Make White Background: true
Scenario: Process large text signage photo
Camera OCR node:
- Path: "C:/photos/sign.jpg"
- Out Path: "C:/processed/sign.jpg"
- Language: English
- Has Large Characters: true
- Correct Geometrical Distortions: true
- Remove Motion Blur: true
Common Use Cases
- Mobile Document Capture - Process documents photographed with smartphones
- Receipt Scanning - Enhance and extract text from receipt photos
- Business Card OCR - Clean up and read business card photos
- Form Processing - Process photos of filled forms
- Sign Reading - Extract text from photographed signs or labels
- Whiteboard Capture - Clean up whiteboard photos for OCR
- Book Scanning - Process book page photos
- License Plate Recognition - Enhance photos for plate reading (with large characters)
Image Enhancements
Crop Image
- Automatically detects document boundaries
- Removes unnecessary background
- Focuses processing on document area
- Improves OCR accuracy
Correct Orientation
- Detects if image is rotated
- Automatically rotates to correct orientation
- Critical for handheld photos
- Works with 90, 180, 270 degree rotations
Correct Geometrical Distortions
- Fixes perspective distortion from angled photos
- Corrects trapezoid effects
- Straightens curved text lines
- Essential for non-perpendicular captures
Deskew Image
- Straightens skewed images
- Corrects rotational misalignment
- Aligns text to horizontal
- Improves OCR line detection
Noise Removal
- Reduces grain and noise
- Improves text clarity
- Multiple models for different noise types
- Select model matching noise characteristics
Remove Motion Blur
- Reduces blur from camera movement
- Sharpens image details
- Critical for handheld photos
- Improves character recognition
Make White Background
- Normalizes background color
- Increases contrast
- Removes color casts
- Creates clean, scanner-like output
Output Statistics
The statistics object includes:
- Processing Time - Total time for image processing
- Quality Metrics - Image quality scores
- Enhanced Images - Array of processed image objects
- Recognition Results - OCR results if language specified
Multiple output images may be generated if document splitting occurs.
Tips and Best Practices
- When to Use:
- Photos taken with smartphones or tablets
- Handheld camera captures
- Non-professional image sources
- Images with motion blur or poor alignment
- Photos of documents on surfaces (not scanned)
- Language Selection:
- Specify language for OCR
- Use "_" to only enhance without OCR
- Combine enhancement with separate OCR for flexibility
- Noise Model:
- Choose based on image characteristics
- NMM_NoisyImage: Low light, high ISO photos
- NMM_BlurredImage: Motion blur, out of focus
- NMM_NoisyBlurredImage: Both issues present
- None: Clean, well-lit photos
- Enhancement Options:
- Enable all for unknown image quality
- Disable specific options if not needed
- Each enhancement adds processing time
- More enhancements = better quality but slower
- Large Characters:
- Enable for signs, headlines, posters
- Disable for normal document text
- Optimizes recognition for font size
- Improves accuracy for large text
- Image Quality:
- Higher resolution = better results
- Good lighting improves all enhancements
- Avoid extreme angles (over 30 degrees)
- Keep camera steady for less blur
- Output Path:
- Multiple images may be created (numbered)
- Format: basename.jpg, basename_2.jpg, etc.
- Ensure sufficient disk space
- Output is always enhanced version
- Performance:
- Enhancement takes time (3-10 seconds typical)
- More corrections = longer processing
- Image size affects processing time
- Warming up engine is one-time overhead
- Best Capture Practices:
- Use good lighting
- Hold camera steady
- Capture perpendicular to document
- Include some margin around document
- Avoid shadows on document
- Use highest camera resolution
- Comparison with Scanners:
- Camera OCR bridges gap between camera and scanner
- Enhancements make photos scanner-quality
- Ideal for mobile workflows
- More forgiving than raw OCR
- Workflow Integration:
- Use Camera OCR as preprocessing step
- Follow with standard Process Document if needed
- Extract statistics for quality monitoring
- Archive both original and enhanced images
- Error Handling:
- Enable Continue On Error for batches
- Check statistics for quality issues
- Review low-quality images manually
- Recapture if enhancement insufficient