npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/openalpr

v3.0.0

Published

DataFire integration for OpenALPR CarCheck API

Downloads

3

Readme

@datafire/openalpr

Client library for OpenALPR CarCheck API

Installation and Usage

npm install --save @datafire/openalpr
let openalpr = require('@datafire/openalpr').create();

.then(data => {
  console.log(data);
});

Description

The OpenALPR CarCheck API allows you to send images to the cloud for processing. The image will be analyzed for license plates and vehicle make/models. The results are returned in JSON format

Actions

getConfig

Get a list of available results for plate and vehicle recognition

openalpr.getConfig(null, context)

Input

This action has no parameters

Output

  • output object
    • countries array
      • items object
        • code string
        • name string
    • vehicle_labels object
      • bodytype array
        • items string
      • color array
        • items string
      • make array
        • items string
      • makemodel array
        • items string
      • orientation array
        • items string
      • year array
        • items string

recognizeFile

Send an image for OpenALPR to analyze and provide metadata back The image is sent as a file using a form data POST

openalpr.recognizeFile({
  "image": "",
  "secret_key": "",
  "country": ""
}, context)

Input

  • input object
    • image required string, object: The image file that you wish to analyze
      • content string
      • encoding string (values: ascii, utf8, utf16le, base64, binary, hex)
      • contentType string
      • filename string
    • secret_key required string: The secret key used to authenticate your account. You can view your
    • recognize_vehicle integer (values: 0, 1): If set to 1, the vehicle will also be recognized in the image
    • country required string: Defines the training data used by OpenALPR. "us" analyzes
    • return_image integer (values: 0, 1): If set to 1, the image you uploaded will be encoded in base64 and
    • topn integer: The number of results you would like to be returned for plate
    • is_cropped integer (values: 0, 1): When providing a plate or vehicle that is already cropped,

Output

  • output object
    • credit_cost integer: The number of API credits that were used to process this image
    • credits_monthly_total integer: The maximum number of API credits available this month according to your plan
    • credits_monthly_used integer: The number of API credits used this month
    • data_type string (values: alpr_results, alpr_group, heartbeat): Specifies the type of data in this response
    • epoch_time number: Epoch time that the image was processed in milliseconds
    • img_height integer: Height of the input image in pixels
    • img_width integer: Width of the uploaded image in pixels
    • processing_time object
      • plates number: Time spent performing license plate recognition (in milliseconds)
      • total number: Time spent processing all tasks (in milliseconds)
      • vehicles number: Time spent performing vehicle recognition (in milliseconds)
    • regions_of_interest array: Describes the areas analyzed in the input image
    • results array
    • vehicles array: Describes all vehicles found in the input image
    • version integer: API format version

recognizeBytes

Send an image for OpenALPR to analyze and provide metadata back The image is sent as base64 encoded bytes.

openalpr.recognizeBytes({
  "image_bytes": "",
  "secret_key": "",
  "country": ""
}, context)

Input

  • input object
    • image_bytes required string
    • secret_key required string: The secret key used to authenticate your account. You can view your
    • recognize_vehicle integer (values: 0, 1): If set to 1, the vehicle will also be recognized in the image
    • country required string: Defines the training data used by OpenALPR. "us" analyzes
    • return_image integer (values: 0, 1): If set to 1, the image you uploaded will be encoded in base64 and
    • topn integer: The number of results you would like to be returned for plate

Output

  • output object
    • credit_cost integer: The number of API credits that were used to process this image
    • credits_monthly_total integer: The maximum number of API credits available this month according to your plan
    • credits_monthly_used integer: The number of API credits used this month
    • data_type string (values: alpr_results, alpr_group, heartbeat): Specifies the type of data in this response
    • epoch_time number: Epoch time that the image was processed in milliseconds
    • img_height integer: Height of the input image in pixels
    • img_width integer: Width of the uploaded image in pixels
    • processing_time object
      • plates number: Time spent performing license plate recognition (in milliseconds)
      • total number: Time spent processing all tasks (in milliseconds)
      • vehicles number: Time spent performing vehicle recognition (in milliseconds)
    • regions_of_interest array: Describes the areas analyzed in the input image
    • results array
    • vehicles array: Describes all vehicles found in the input image
    • version integer: API format version

recognizeUrl

Send an image for OpenALPR to analyze and provide metadata back The image is sent as a URL. The OpenALPR service will download the image and process it

openalpr.recognizeUrl({
  "image_url": "",
  "secret_key": "",
  "country": ""
}, context)

Input

  • input object
    • image_url required string: A URL to an image that you wish to analyze
    • secret_key required string: The secret key used to authenticate your account. You can view your
    • recognize_vehicle integer (values: 0, 1): If set to 1, the vehicle will also be recognized in the image
    • country required string: Defines the training data used by OpenALPR. "us" analyzes
    • return_image integer (values: 0, 1): If set to 1, the image you uploaded will be encoded in base64 and
    • topn integer: The number of results you would like to be returned for plate

Output

  • output object
    • credit_cost integer: The number of API credits that were used to process this image
    • credits_monthly_total integer: The maximum number of API credits available this month according to your plan
    • credits_monthly_used integer: The number of API credits used this month
    • data_type string (values: alpr_results, alpr_group, heartbeat): Specifies the type of data in this response
    • epoch_time number: Epoch time that the image was processed in milliseconds
    • img_height integer: Height of the input image in pixels
    • img_width integer: Width of the uploaded image in pixels
    • processing_time object
      • plates number: Time spent performing license plate recognition (in milliseconds)
      • total number: Time spent processing all tasks (in milliseconds)
      • vehicles number: Time spent performing vehicle recognition (in milliseconds)
    • regions_of_interest array: Describes the areas analyzed in the input image
    • results array
    • vehicles array: Describes all vehicles found in the input image
    • version integer: API format version

Definitions

coordinate

  • coordinate object
    • x integer
    • y integer

plate_candidate

  • plate_candidate object
    • confidence number: Confidence percentage that the plate number is correct
    • matches_template integer: Indicates whether the plate matched a regional text pattern
    • plate string: Plate number

plate_details

  • plate_details object
    • candidates array: All the top N candidates that could be the correct plate number
    • confidence number: Confidence percentage that the plate number is correct
    • coordinates array: The X/Y coordinates of the license plate in the image
    • matches_template integer: Indicates whether the plate matched a regional text pattern
    • plate string: Best plate number for this plate
    • processing_time_ms number: Number of milliseconds to process the license plate
    • region string: Specified or detected region (e.g., tx for Texas)
    • region_confidence number: Confidence percentage that the plate region is correct
    • requested_topn integer: The max number of results requested
    • vehicle vehicle_details
    • vehicle_region region_of_interest

region_of_interest

  • region_of_interest object
    • height integer
    • width integer
    • x integer
    • y integer

vehicle_candidate

  • vehicle_candidate object
    • confidence number: confidence of value (percent)
    • name string: name of value

vehicle_details

vehicles

  • vehicles object