How linhuanran/ocr works
天若 OCR is a Windows desktop OCR application. The main workflow is to initiate recognition from the desktop, process an image through an OCR service, and work with the returned text; the application also provides text editing, translation, history, and configuration capabilities. The sampled code confirms startup/configuration, Baidu OCR requests, and image-byte conversion. Some UI wiring and the implementation of documented or apparent secondary features are unsampled, so uncertain links are omitted.
Main entry points: FmMain.cs Main window · Program.cs Application startup · IniHelper.cs INI configuration · FmSetting.cs Settings window
Components 14
Capture and OCR
- Main window
FmMain.cs - Screen paste
FmScreenPaste.cs - OCR image helper
Helper/OcrHelper.cs
Text workflow
- Rich text editor
AdvRichTextBox.Designer.cs - Translation helper
Helper/TranslateHelper.cs - Text records
Fmnote.cs - Text replacement
ReplaceForm.cs
Desktop application
- Settings window
FmSetting.cs - Application startup
Program.cs - INI configuration
Helper/IniHelper.cs
Integrations
- Baidu OCR
- HTTP helper
Helper/CommonHelper.cs - Update service
Other components
- User
Connections 15
- User → Main window: uses
- Main window → Screen paste: opens capture
- Main window → OCR image helper: converts image
- Main window → Baidu OCR: submits OCR
- Baidu OCR → Main window: returns text
- Main window → Rich text editor: presents text
- Main window → Translation helper: translates text
- Main window → Text records: opens records
- Main window → Text replacement: opens replacement
- Application startup → Main window: launches
- Application startup → INI configuration: reads and writes
- Settings window → INI configuration: reads and writes
- Main window → INI configuration: reads and writes
- Main window → HTTP helper: posts request
- Application startup → Update service: checks updates