HIK.ANPR.Cam.NetCore
1.0.5
dotnet add package HIK.ANPR.Cam.NetCore --version 1.0.5
NuGet\Install-Package HIK.ANPR.Cam.NetCore -Version 1.0.5
<PackageReference Include="HIK.ANPR.Cam.NetCore" Version="1.0.5" />
<PackageVersion Include="HIK.ANPR.Cam.NetCore" Version="1.0.5" />
<PackageReference Include="HIK.ANPR.Cam.NetCore" />
paket add HIK.ANPR.Cam.NetCore --version 1.0.5
#r "nuget: HIK.ANPR.Cam.NetCore, 1.0.5"
#:package HIK.ANPR.Cam.NetCore@1.0.5
#addin nuget:?package=HIK.ANPR.Cam.NetCore&version=1.0.5
#tool nuget:?package=HIK.ANPR.Cam.NetCore&version=1.0.5
HIK ANPR CAM for Modern .NET
HIK ANPR CAM is a commercial WinForms component for Hikvision ANPR/LPR cameras. It helps C# and VB.NET developers receive real-time automatic license plate recognition events, plate data, and saved vehicle images without writing low-level camera integration code.
Use it to build parking systems, gate automation, vehicle access control, traffic monitoring, and license plate recognition applications.
Supported Applications
- Modern .NET Windows applications
- Windows Forms applications
- C# or VB.NET
- x86 or x64 build platform
Install
Install the package from NuGet:
dotnet add package HIK.ANPR.Cam.NetCore
Then open the Visual Studio Toolbox and add ANPR_CAM to your form, or create it in code.
Build
- Open your project in Visual Studio.
- Open
Build > Configuration Manager. - Select
x86orx64. - Build the project.
- Run the application.
Do not build as Any CPU. Select the platform that matches the application you want to deploy.
Command-line build example:
dotnet build -c Release -p:PlatformTarget=x64
Use x86 instead of x64 when building a 32-bit application.
Quick Start
using System;
using System.IO;
using System.Windows.Forms;
using HIK_ANPR;
public partial class Form1 : Form
{
private ANPR_CAM _camera;
private void connectButton_Click(object sender, EventArgs e)
{
Directory.CreateDirectory(@"C:\anpr_data");
_camera = new ANPR_CAM
{
CamIp = "192.168.1.64",
CamPort = 8000,
CamUsername = "admin",
CamPassword = "your-password",
PictureFolder = @"C:\anpr_data\"
};
_camera.NP_detected += Camera_NP_detected;
_camera.ErrorOccurred += Camera_ErrorOccurred;
if (!_camera.Login())
{
MessageBox.Show("Camera login failed.");
}
}
private void Camera_NP_detected(object sender, NP_Info e)
{
string message =
$"Plate: {e.StringPlateLicense}\n" +
$"Category: {e.StringPlateCatogry}\n" +
$"Time: {e.StrTime}\n" +
$"Plate image: {e.PlatePicPath}";
MessageBox.Show(message);
}
private void Camera_ErrorOccurred(object sender, string message)
{
MessageBox.Show(message, "ANPR Error");
}
}
Important Functions
| Member | Use |
|---|---|
Login() |
Connects to the camera and starts receiving ANPR/LPR events. |
Take_Picture(string pic_name) |
Captures a JPEG image from the camera and saves it in PictureFolder. |
NP_detected |
Event raised when a plate is detected. |
ErrorOccurred |
Event raised when the camera or ANPR process reports an error. |
ShowActivationBox() |
Shows the activation window. |
SetLicenseCode(string licenseCode) |
Applies a license code in code when needed. |
Camera Properties
| Property | Use |
|---|---|
CamIp |
Camera IP address. |
CamPort |
Camera port, usually 8000. |
CamUsername |
Camera username. |
CamPassword |
Camera password. |
PictureFolder |
Folder where vehicle and plate images are saved. |
Data Returned By NP_detected
The NP_detected event returns an NP_Info object.
| Property | Data |
|---|---|
StringPlateLicense |
Recognized plate number. |
StringPlateCatogry |
Plate category returned by the camera. |
StrTime |
Detection time. |
StrIp |
Camera IP when available. |
PlateColor |
Plate color code. |
VhicealType |
Vehicle type code. |
Country |
Country code. |
Region |
Region code. |
LicenNumberLen |
Plate number length. |
PlateSize |
Plate size code. |
PlateType |
Plate type code. |
CarDiraction |
Vehicle direction code. |
CarColor |
Vehicle color code. |
CarLogo |
Vehicle logo or brand code. |
PlatePicPath |
Full saved path of the plate image. |
PlatePicName |
Saved plate image file name. |
CarPicPath |
Full saved paths of vehicle images. |
CarPicName |
Saved vehicle image file names. |
Capture A Manual Picture
bool saved = _camera.Take_Picture("manual_capture_001");
if (saved)
{
MessageBox.Show("Picture saved.");
}
The image is saved in the folder set by PictureFolder.
VB.NET Event Example
Private Sub AnpR_CAM1_NP_detected(sender As Object, e As HIK_ANPR.NP_Info) Handles AnpR_CAM1.NP_detected
MessageBox.Show("Plate: " & e.StringPlateLicense & Environment.NewLine &
"Category: " & e.StringPlateCatogry & Environment.NewLine &
"Time: " & e.StrTime)
End Sub
Activation
When activation is required, call:
ANPR_CAM.ShowActivationBox();
Or apply a license code in code:
ANPR_CAM.SetLicenseCode("YOUR-LICENSE-CODE");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.5 | 126 | 6/15/2026 |