You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
NTCIP Object Count Filtering
print icon

This article will take you through how to trigger a NTCIP call when the number of pedestrians in the crosswalk meets and/or exceeds a specified value. If you would like to trigger a NTCIP call when any number of pedestrians are in the crosswalk, see this sample NTCIP configuration guide instead.

 

Sample Presence Event JSON:

{
    "imageSize": {
        "x": 1264,
        "y": 720
    },
    "objectType": "car",
    "sensorData": {
        "active": true,
        "numObjectsInRegion": 3,
        "object": {
            "confidence": 0.67083024978637695,
            "enteredOn": 1632237441457,
            "inferenceConfidence": -0.10000000149011612,
            "objectType": "car",
            "trackerConfidence": 0.67083024978637695,
            "uniqueId": 13260042503639269394
        },
        "startOn": 1632237440818
    },
    "sensorName": "PRESENCE_CAR_1",
    "sensorType": "presence",
    "streamId": "0",
    "timecollected": "2021-09-21 15:17:21.458",
    "uniqueId": "80e5171f-0a2f-43e2-9072-70055dc1d310",
    "version": 2
}

Instructions

First, ensure that there is a presence sensor monitoring the crosswalk of interest. Note the presence sensor name (i.e. PRESENCE_PERSON_1) that you would like to have trigger the NTCIP calls.

 

 

Next, follow the instructions at this Knowledge Base article to configure NTCIP calls on entry/exit into the presence sensor. 

 

Now, to modify the entry NTCIP call so that it is only triggered when a certain number (or more) of pedestrians are present, add an additional sensorData filter per the guidelines below:

 

for numObjectsInRegion value < 10:

[X-9] : any number X and above, until 9

[1-9]\d{1,} : any number 10 and above

 

regex = [X-9]|[1-9]\d{1,}

 

Example: 

trigger whenever numObjectsInRegion >= 4, add sensorData filter:

 

Regex for numObjectsInRegion value >= 10, (and <100):

X : first digit of value (i.e. value=28, X=2)

Y : second digit of value (i.e. value=28, Y=8)

Z = X+1

regex = [X-9][Y-9]|[Z-9]\d{1,}

 

Example: 

trigger whenever numObjectsInRegion >= 12, add sensorData filter:

scroll to top icon