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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HIK.ANPR.Cam.NetCore" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HIK.ANPR.Cam.NetCore" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="HIK.ANPR.Cam.NetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HIK.ANPR.Cam.NetCore --version 1.0.5
                    
#r "nuget: HIK.ANPR.Cam.NetCore, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HIK.ANPR.Cam.NetCore@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HIK.ANPR.Cam.NetCore&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=HIK.ANPR.Cam.NetCore&version=1.0.5
                    
Install as a Cake Tool

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

  1. Open your project in Visual Studio.
  2. Open Build > Configuration Manager.
  3. Select x86 or x64.
  4. Build the project.
  5. 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 Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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