How tanishktewetia/credential_blur_ocr_lab works
OcrLab is a local Windows WPF experiment for testing credential redaction in captured screen frames. The user starts capture in the UI; CaptureService captures a primary-monitor frame, runs Windows OCR, asks CredentialMatcher to identify sensitive lines, redacts their bounds, then resizes, encodes, and saves the processed JPEG. The UI can stop capture and displays status without showing matched text. The README documents the processing stages; the sampled CaptureService excerpt is partial, so some internal stage links rely on that documentation.
Main entry points: CaptureService.cs Capture loop · MainWindow.xaml.cs UI event handling · MainWindow.xaml Start/Stop UI · CredentialMatcher.cs Credential matching
Components 13
User interface
- Start/Stop UI
OcrLab/MainWindow.xaml - UI event handling
OcrLab/MainWindow.xaml.cs
Frame capture
- Capture loop
OcrLab/CaptureService.cs - Primary monitor
- Windows capture
- Direct3D device
OcrLab/CaptureService.cs - Monitor interop
OcrLab/CaptureService.cs
Frame processing
- Windows OCR
- Credential matching
OcrLab/CredentialMatcher.cs - Blackout regions
OcrLab/CaptureService.cs
Redacted output
- Resize and encode
OcrLab/CaptureService.cs - JPEG output
Other components
- Operator
Connections 15
- Operator → Start/Stop UI: starts or stops
README.md - Start/Stop UI → UI event handling: raises events
README.md - UI event handling → Capture loop: starts or stops
OcrLab/MainWindow.xaml.cs - Capture loop → Monitor interop: creates monitor item
OcrLab/CaptureService.cs - Capture loop → Direct3D device: creates device
OcrLab/CaptureService.cs - Capture loop → Windows capture: starts capture
OcrLab/CaptureService.cs - Monitor interop → Primary monitor: selects primary
OcrLab/CaptureService.cs - Windows capture → Primary monitor: captures frame
README.md - Capture loop → Windows OCR: recognizes frame
README.md - Capture loop → Credential matching: passes OCR result
OcrLab/CaptureService.cs - Capture loop → Blackout regions: draws black rectangles
README.md - Credential matching → Blackout regions: returns bounds
README.md - Capture loop → Resize and encode: resizes and encodes
README.md - Resize and encode → JPEG output: writes JPEG
README.md - Capture loop → UI event handling: reports status
OcrLab/MainWindow.xaml.cs