nDisplays #

nDisplays is an optional request parameter, which should indicate the expected number of displays that the meter should contain, if this happens to be known beforehand. Providing this parameter might result in more accurate readings by Blicker. In addition, it can be used to verify that the readings by Blicker are in line with the expectations.

For most meters, this number is either one or two. As an example, the following test image has 2 displays.

If Blicker is able to verify that the expected number of displays has indeed been found, no special message is returned. For example, when the expected number of displays was 2, the response will contain:

    "expectedNDisplays": 2

When the number of displays could not be verified, the response will contain messageCode no_match_expected_n_displays. For example:

    "expectedNDigits": 4,
    "messages": [
            "code": "no_match_expected_n_displays",
            "message": "The number of displays detected does not match the expected number.",
            "messageId": "<messageId",
            "objectId": "<objectId>"

When the number of detected displays differs from the expected number, it is a sign that something may have gone wrong, and that the particular request later needs to be manually checked in the Blicker portal.

Example request #

curl -X 'POST' \
  'https://api.blicker.ai/blicker/2020-10-01' \
  -H 'subscription-key: <your subscription key>' \
  -F 'image=@test_image.jpg' \
  -F 'nDisplays=2'
from pathlib import Path
from pprint import pprint

import requests

response = requests.post(
    headers={"subscription-key": "<your subscription key>"},
    files={"image": ("test_image.jpg", Path("test_image.jpg").read_bytes())},
    data={"nDisplays": 2},