Skip to content

Commit c94d9cc

Browse files
committed
Add a DCV sample supporting barcode, mrz and document detection
1 parent 322ed06 commit c94d9cc

File tree

4 files changed

+3254
-0
lines changed

4 files changed

+3254
-0
lines changed

examples/official/dcv/README.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Dynamsoft Capture Vision - Multi-Mode Scanner
2+
3+
A comprehensive PySide6-based desktop application for real-time and file-based detection of barcodes, documents, and MRZ (Machine Readable Zone) data using the Dynamsoft Capture Vision SDK.
4+
5+
![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)
6+
![PySide6](https://img.shields.io/badge/PySide6-Qt6-green.svg)
7+
![OpenCV](https://img.shields.io/badge/OpenCV-4.x-red.svg)
8+
![Dynamsoft](https://img.shields.io/badge/Dynamsoft-SDK-orange.svg)
9+
10+
## 🌟 Features
11+
12+
### 📁 **Picture Mode**
13+
- **Multi-format Support**: JPG, PNG, BMP, TIFF, WEBP, PDF
14+
- **Native PDF Processing**: Built-in PDF page extraction and processing
15+
- **Multi-page Navigation**: Browse through PDF pages with intuitive controls
16+
- **Drag & Drop**: Easy file loading by dragging files into the application
17+
- **Zoom Controls**: Multiple zoom levels (25% to 500%) with fit-to-window option
18+
- **Visual Annotations**: Real-time overlay of detection results on images
19+
20+
### 📷 **Camera Mode**
21+
- **Real-time Detection**: Live scanning with immediate visual feedback
22+
- **Multiple Camera Support**: Automatic detection and selection of available cameras
23+
- **Adjustable Settings**: Detection frequency control and various processing options
24+
- **Live Annotations**: Real-time overlay of detection results on camera feed
25+
- **Frame Capture**: Save current camera frame for further analysis
26+
27+
### 🔍 **Detection Modes**
28+
1. **Barcode Detection**
29+
- QR Codes, Data Matrix, PDF417, Aztec, MaxiCode
30+
- Linear barcodes: Code 39, Code 128, EAN, UPC, etc.
31+
- Consistent color coding for multiple barcodes
32+
- Confidence scoring and validation
33+
34+
2. **Document Detection**
35+
- Automatic document boundary detection
36+
- Image deskewing and normalization
37+
- Side-by-side original/processed view
38+
- Document quality assessment
39+
40+
3. **MRZ (Machine Readable Zone)**
41+
- Passport and ID card reading
42+
- Complete personal information extraction
43+
- Document validation and verification
44+
- Parsed data display with structured formatting
45+
46+
## 🚀 Installation
47+
48+
### Prerequisites
49+
```bash
50+
pip install PySide6 opencv-python numpy
51+
```
52+
53+
### Dynamsoft SDK
54+
Install the Dynamsoft Capture Vision SDK:
55+
```bash
56+
pip install dynamsoft-capture-vision-bundle
57+
```
58+
59+
### Additional Dependencies
60+
```bash
61+
pip install psutil # Optional: for memory monitoring
62+
```
63+
64+
## 🏁 Quick Start
65+
66+
### Running the Application
67+
```bash
68+
python main.py
69+
```
70+
71+
### Basic Usage
72+
73+
#### Picture Mode
74+
1. Click **"📂 Load File"** or drag & drop an image/PDF
75+
2. Select detection mode: **Barcode**, **Document**, or **MRZ**
76+
3. Click **"🔍 Detect"** to process the file
77+
4. View results in the right panel
78+
5. Use zoom controls for detailed inspection
79+
6. Export results in TXT, CSV, or JSON format
80+
81+
#### Camera Mode
82+
1. Switch to **"📷 Camera Mode"** tab
83+
2. Select your camera from the dropdown
84+
3. Choose detection mode (Barcode/Document/MRZ)
85+
4. Click **"📷 Start Camera"**
86+
5. Enable **"Real-time Detection"**
87+
6. Point camera at target objects
88+
7. View live results in the results panel
89+
90+
## 🎛️ Interface Overview
91+
92+
### Main Window
93+
- **Tabbed Interface**: Switch between Picture and Camera modes
94+
- **Resizable Panels**: Adjust layout to your preference
95+
- **Status Bar**: Real-time processing information and memory usage
96+
- **Menu Bar**: Quick access to common functions and settings
97+
98+
### Picture Mode Layout
99+
```
100+
┌─────────────┬──────────────────┬─────────────┐
101+
│ Control │ Image │ Results │
102+
│ Panel │ Display │ Panel │
103+
│ │ │ │
104+
│ • File Ops │ • Zoom Controls │ • Summary │
105+
│ • Settings │ • Image View │ • Details │
106+
│ • Actions │ • Annotations │ • Export │
107+
└─────────────┴──────────────────┴─────────────┘
108+
```
109+
110+
### Camera Mode Layout
111+
```
112+
┌─────────────┬──────────────────┬─────────────┐
113+
│ Camera │ Live Feed │ Live │
114+
│ Controls │ │ Results │
115+
│ │ │ │
116+
│ • Settings │ • Real-time │ • Recent │
117+
│ • Detection │ Annotations │ Detections│
118+
│ • Actions │ • Controls │ • History │
119+
└─────────────┴──────────────────┴─────────────┘
120+
```
121+
122+
123+
## 📝 File Support
124+
125+
### Image Formats
126+
- **JPEG/JPG**: Standard photo format
127+
- **PNG**: Lossless compression with transparency
128+
- **BMP**: Windows bitmap format
129+
- **TIFF/TIF**: High-quality image format
130+
- **WEBP**: Modern web image format
131+
132+
### Document Formats
133+
- **PDF**: Multi-page document support with native processing
134+
135+
### Camera Formats
136+
- **USB Cameras**: Standard UVC-compatible cameras
137+
- **Built-in Cameras**: Laptop/tablet integrated cameras
138+
- **Network Cameras**: IP cameras (with proper drivers)

0 commit comments

Comments
 (0)