Discover how we’ve created a lean yet highly powerful solution with modern camera control, optimized OCR, and intelligent logic—from initial hurdles to real-time evaluation.

In short
ConveyorVision combines robust camera control, high-performance OCR, intelligent conveyor belt logic, a modular plugin architecture, and insightful statistics within a .NET framework. With a simulator, live histogram, and transparent feedback, new features can be developed, tested, and deployed to customers swiftly.
Development was completed within one month.
Introduction
ConveyorVision is a .NET-based WPF application specifically designed to detect and evaluate date imprints on packaging boxes in real-time on conveyor belts. Beneath the surface lies a modular structure comprising:
- camera service (DirectShow-based)
- OCR service (deep learning)
- Segmentation and Logic Engine
- Statistics and visualization module
- PLC integration (Siemens LOGO! via Modbus)
- Simulator and Unit tests
Core Features
- Dynamic camera control
Resolution, FPS, Image Format (RGB24 / MJPG), Flip & Rotation in 90° Increments
- Manual exposure time, gain, brightness, contrast, white balance
- ROI (Region of Interest) for cropping and histogram overlay
- Up to 30 FPS in the cropped area
- High-performance OCR pipeline
Tesseract configuration with brute-force optimization
- Deep learning fallback models for tricky cases
- Whitelist filter, DPI adjustment, grayscale conversion, 24-bit mode
- ROI cropping for focused recognition
- Intelligent conveyor belt logic
Detection of whether a box is already in the field of view (no light barrier required)
- Automatic triggering of actuators via Siemens LOGO! with Modbus
- Handling of nested packages, congestion situations, and “idle time”
- Real-time statistics & visualization
Stacked time intervals (10 seconds to minutes) for valid vs. invalid boxes
- Live diagrams without axis labels, just subtle grid lines
- Metrics: Total, Min/Max, Average, Start/End Time
- Simulation mode & UI feedback
Integrated dispatcher timer for testing modules
- Histogram overlay and transparent masks for intuitive ROI adjustment
- “Traffic light” feedback (green/red) with contrast-equivalent foreground text
- Modular architecture & quality assurance
Plugin architecture enables easy extension with new modules
- Clean separation of services, view models, and utilities
- Extensive unit tests for camera, OCR, segmenter, and statistics
- Functionality guaranteed through automated test runs
- Data logging & cloud connectivity
Local CSV/TXT logs for frames, performance and segments
- Optional upload to server or cloud (REST/FTP)
- Persistent settings via JSON and reflection
Developer Insights: Challenges & Solutions
- Incorrect SPS server IP**Endless debugging: ✓ Cable? ✓ LOGO! firmware? ✓ .NET Modbus client? In the end, only end-to-end tracing in the BackgroundWorker proved effective.**
Relay card vs. LOGO!<br>Originally, we planned to control valves directly via relays. Thanks to stable image logic, we bypassed this and reliably used the SPS-LOGO! via Modbus.
Removal of the light barrier****Intelligent image recognition detects ‘box present/box gone’ entirely through software – the external light barrier is no longer needed.
Statistics display****Out-of-the-box, no ready-made diagram for stacked buckets is available. We’ve implemented custom rectangle bar series and fixed time intervals (10s / 1min) using OxyPlot.
Performance Optimization
Camera Tuning
Shorter exposure times, MJPEG encoding
- Dynamic frame rate limits → faster conveyor belt
OCR models
- Bruteforce tuning (English/German, PSM variants, DPI, whitelist, etc.)
- Deep-Learning-Fallback for complex texts
ROI & filter chains
- Process only relevant image sections
- Contrast and sharpening filters improve recognition rates
Result:From 0.2 images per second on an old laptop to 5–10 FPS today (up to 30 FPS in the ROI) on modern hardware.
Quality assurance & brute-force tuning
brute-force scripts for daysTesting all OCR combinations on video footage
Automated evaluation:CSV and performance metrics per configuration
Unit tests for all critical classes:Camera initialization, format switching, buffer callbacks, segmenter logic
Test video from the development phase (Alpha version)
Learn more and try it out now: https://tb-software.ch/page/conveyorvision-applikation-industrielle-bildverarbeitung-für-foerderbaender/
