License Plate Recognition Example
HUSKYLENS 2 license recognition reads, counts and filters plates, like a smart camera that tags each plate with ID and position data. It detects plates in frame, outputs ID 0 for unlearned ones and the learned ID for trained plates, then sends ID, name, content, size and center coordinates via serial. Blocks let users check if any plate exists, get the nearest plate, count all plates, or query only plates with a specific ID and index when multiple identical IDs appear.
1.License Plate Recognition Blocks
Before You Start:
1.1 License Recognition Outputs Data
In the License Recognition function, when a license plate appears on the HUSKYLENS 2 screen, it can be detected and framed. You can obtain data of the plate closest to the crosshair and print it via the serial port. The readable data include: license ID, name, content (plate number), width, height, and the X/Y coordinates of the plate center.
The sample program is shown below.
Click “Upload” in Mind+ and wait for the upload to complete. Then use the touchscreen to enter the License Recognition function of HUSKYLENS 2.
Aim the HUSKYLENS 2 camera at the license plate, open the serial port in Mind+, and observe the output results.
Result: For unlearned plates, the default output ID is 0.
You can point the camera at a learned license plate. For detailed instructions on how to learn license plates, see License Plate Recognition
Result:For learned license plates, the output ID matches the ID displayed on the HUSKYLENS 2 screen.
1.2 Count Licenses and Output Specified License Data
When multiple licenses appear in the frame, use the following program to count all detected licenses and obtain data for a specific license ID.
Result:When multiple licenses appear in the frame, HUSKYLENS 2 can recognize all of them (both learned and unlearned). The serial port displays the total number of licenses detected and outputs data for the specified license (e.g., ID=1).
1.3 Count Specified Licenses and Output Data
When multiple licenses with the same ID appear (learned IDs are assigned sequentially and unlearned IDs default to 0), use the following program to count and obtain data for a specified license.
Result:When multiple identical licenses appear, HUSKYLENS 2 can recognize all ID=1 licenses (if previously learned and assigned ID=1). The serial port displays the total number of ID1 licenses and outputs data for the first detected one.
1.4 License Recognition Block Description
| block | description |
|---|---|
|
Used to obtain one set of license recognition data under the License Recognition function of HUSKYLENS 2. |
|
Determines whether a license plate exists in the current frame. |
|
Obtains data of the license closest to the crosshair, including ID, name, center X/Y coordinates, width, height, and decoded content. |
|
Gets the total number of detected licenses (both learned and unlearned). |
|
When multiple licenses are detected, obtains data for a specified license. |
|
Determines whether a license with the specified ID exists in the frame. Unlearned licenses have ID=0, learned IDs follow learning order. |
|
Obtains the number of licenses with a specified ID in the frame. |
|
Obtains data for a specified license in the frame. |
|
When multiple licenses share the same ID, obtains data for a specified license. |
Was this article helpful?
