HUSKYLENS 2 Optical Character Recognition Function Description
The article explores the HUSKYLENS 2 Optical Character Recognition function, detailing how it detects, learns, and recognizes text from images. It covers selecting OCR functions, observing recognition effects, learning characters, and adjusting parameters for optimal performance. The article also explains how to export and import models for sharing settings across devices, ensuring consistent text recognition capabilities.
1.Introduction to Optical Character Recognition
Optical characters refer to text presented on images through optical imaging devices (e.g., cameras, scanners). Optical Character Recognition (OCR) is a technology that automatically recognizes text from these images and converts it into editable, searchable electronic text, enabling computers to understand and utilize text information from paper documents or images.
In this function, HUSKYLENS 2 can detect Chinese and English characters in the screen and display their content, and it can learn and recognize track characters.
Note: Under the optical character recognition function, HUSKYLENS 2 can detect the area where all text blocks appear in the screen and circle them with a box, but only recognizes the content of the text block area closest to the cross cursor and displays it in the upper left corner of the box.
2.Instructions for Using Optical Character Recognition
In this section, we will learn how to use HUSKYLENS 2 to detect text on the screen and learn and recognize the text pointed to by the cross cursor.
2.1 Selecting the Optical Character Recognition Function
Power up HUSKYLENS 2, after successful startup, swipe the screen to find the "Optical Character Recognition" function.
2.2 Observing the Optical Character Detection Effect
Point HUSKYLENS 2 at a screen with text. When text is detected, the screen will frame the text in a white box. The recognized text will be displayed on the recognition box pointed to by the "+" cross cursor.
2.3 Learning Characters and Observing Results
Align the text to be learned, adjust the angle at which HUSKYLENS 2 "looks" to position the "+" cross cursor in the center of the screen within the white box, then press Button-A in the upper right corner of HUSKYLENS 2 to start learning.
After learning, if the learned text is recognized, the screen will highlight the text with a colored box and display "name: IDx 90%" above the box. The name defaults to the content of the text, for example, "Hello: ID1 100%". "ID1" refers to the first text you learned, and "100%" is the confidence level. The confidence level indicates the model's confidence that the target text recognized by the current camera is a learned text under Optical Character Recognition (OCR). "ID1 100%" means the model has a 100% chance of recognizing the current text as the learned text with ID 1.
3.Optical Character Recognition Parameter Settings
The factory default parameters of HUSKYLENS 2 already meet the basic functional requirements. If more refined functions are needed, each parameter can be adjusted manually. The following parameters are all based on the "Optical Character Recognition" function, so first ensure the "Optical Character Recognition" function has been entered, as shown in the figure. To select a parameter to modify, slide left or right on the parameter text below the screen.
3.1 Forget ID
To forget all previously learned text: Step 1, click "Forget ID" on the screen; Step 2, a pop-up window displays the message "Forget All IDs and Names", then click "Yes". Position the "cross cursor" of HUSKYLENS 2 over the previously learned but forgotten text. A white box will appear on the HUSKYLENS 2 screen, but the text ID is not recognized, indicating that the "forgetting" process is completed.
3.2 Detection Threshold
Detection Threshold controls the sensitivity of character detection: A lower threshold means a looser standard for "identifying whether it is text" (easily misclassifying non-text information but not missing text); a higher threshold means a stricter standard (less likely to misclassify non-text but may miss text).
Setting steps: Click "Detection Threshold" to open the parameter adjustment slider, which will appear above it. Sliding left reduces the value; sliding right increases it. The effect is shown in the figure.
3.3 Recognition Threshold
Recognition Threshold controls the strictness of text recognition: A lower threshold means a looser condition for matching on-screen text to previously learned text (prone to misrecognition but less likely to omit text); A higher threshold means a stricter condition (prone to omission but less likely to misrecognize text).
Setting steps: Tap "Recognition Threshold" to open the parameter adjustment interface. A slider will appear above it. Sliding the slider to the left decreases the value; sliding to the right increases it. The effect is shown in the figure.
3.4 Set Name
This parameter allows setting a name for learned text, which can be in Chinese or English.
Setting steps: Click "Set Name", slide up and down the number in the top-left corner to select which ID to name; click the on-screen keyboard to set the name (as shown in the left figure); after setting, click the √ button in the bottom-right corner to save. If saved successfully, a green checkmark will appear in the top-right corner.
Note: After setting a name, the recognized text information will not be displayed in the top-left corner of the recognition box, but the set name will be shown. To re-display the original text information, you need to forget the ID.
3.5 Display Name
This parameter controls whether to display the name when text is recognized, with the default being display.
Setting steps: Click "Display Name"—the switch above it will turn blue (on state). When text is recognized, its name will be displayed (as shown in the left figure). Click the switch to turn it white (off state), and the name will not be displayed when text is recognized (as shown in the right figure).
3.6 Restore Default
This parameter can restore all settings to their default status, erase learned IDs and names, but will not clear the exported model (for details on exported models, see below).
Steps: Click "Restore Default", and after the "Restore Default Configuration" popup appears, click "Confirm".
3.7 Export Model
This parameter enables saving and exporting the current settings, learned IDs, and set names to the HUSKYLENS 2 local memory. It is applicable to scenarios such as migrating parameters to another HUSKYLENS 2. This operation does not require inserting a TF card.
Export steps: Click "Export Model". When the "Save Configuration To" pop-up appears (as shown in the left figure), slide the number up and down to select the model number to save (up to 5 models can be saved), then click the "Confirm" button in the bottom-left corner of the pop-up to save. After confirmation, the export will be automatic, as shown in the right figure.
To view the exported model: After the "Exporting..." pop-up disappears, you can check the exported model file through your computer.
First, connect HUSKYLENS 2 to your computer's USB port.
Next, on your computer, you can access the memory of HUSKYLENS 2 via the path shown in the following figure. You can view two model-related files with the extensions .json and .bin. The numbers before the extensions are the "model numbers" selected during configuration saving. Both files can be copied and pasted to other locations.
3.8 Import Model
This parameter allows you to import a model exported from HUSKYLENS 2 (referred to as "HUSKYLENS A") to another HUSKYLENS 2 (referred to as "HUSKYLENS B"). This enables HUSKYLENS B to replicate the text learned and parameter adjustments from HUSKYLENS A without requiring reconfiguration or re-training.
Import Steps:
Step 1: Connect HUSKYLENS A to your computer and copy the exported model file to your desktop.
Step 2: Connect HUSKYLENS B to your computer and paste the model file into the specified folder of HUSKYLENS B (path shown in the figure). (If the "Optical Char Recognition" folder is not found, first perform Step 3: After importing the model, the folder will be automatically created, then return to Step 2.)
Step 3: First, confirm that you have entered the "Optical Character Recognition" function. Then click "Import Model". After the "Load Configuration" pop-up appears, slide the number selector up and down to choose which model to load (this should match the model number saved in the previous step). Finally, click "Confirm" to import.
Step 4: Wait for the "Loading" pop-up to disappear; the import is then complete.
Then you can check if the parameters and learned data of HUSKYLENS B and HUSKYLENS A are consistent. The left image below shows the recognition status of HUSKYLENS B before model import, while the right image shows that of after model import.
Was this article helpful?
