License Plate Recognition Example
HUSKYLENS 2 license plate recognition reads plate text, ID, size, center coordinates and counts learned or unlearned plates in view, like a smart camera tracking multiple tags in real time.
1. License Plate Recognition Example
Before You Start:
1.1 Recognizing License Plates and Outputting Related Data
Under the License Recognition function, when a license plate appears on the HUSKYLENS 2 screen, it can be recognized and framed, and related license plate data can be obtained. The readable data include: the ID and name of the specified license plate, the license plate content (plate number), width, height, the X and Y coordinates of the license plate center point, and the total number of license plates in the frame.
The example program is shown below.
Upload the program and wait for the upload to complete.
Point the Camera of HUSKYLENS 2 at the license plate in the frame to perform learning. For detailed instructions on how to learn license plates, please refer to the License Plate Recognition.
Point the Camera of HUSKYLENS 2 at the license plate and observe the output data.
Running Result: As shown below, if the specified license plate has not been learned, its ID is 0. If the specified license plate has been learned, its corresponding ID is output.
1.2 Outputting Data of a License Plate with a Specified ID
When multiple license plates with the same ID appear in the frame, the following example program can be used to collect and output the related data of license plates with that ID in the frame.
Running Result: As shown below, when multiple license plates with a specified ID appear in the frame, the total number of license plates with that ID in the frame, the plate number of the specified license plate under that ID, and the license plate coordinates can be obtained.
1.3 License Plate Recognition Blocks 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.. |
|
Get the number of license plates that have been learned by HuskyLens 2, regardless of whether they appear in the current frame. |
|
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?
