Vision inspection
8 min
a camera inspection cell on a bottling line fill level read from the frame, per bottle, with the inspection running on the edge rather than in a cloud one device and 15 tags, plus the video itself operator view on 4013 , modbus tcp on 5023 what it demonstrates a fill anomaly caught per bottle the measurement is made from the picture, bottle by bottle, and published as a tag like any other reading filler drift as a forecast the interesting number is not the bottle that failed but the trend that says the filler will start failing shortly inference on the edge the frames never leave the plant to be measured what travels north is a number, and the picture only if you ask for it two paths, on purpose this is the one solution that uses two data paths, because the picture and the numbers suit different ones inspection readings go to devicehub over modbus tcp , like every other solution here these are the tags the edge polls frames go to litmus edge datahub over nats , which is built for payloads of that size and shape a dropped frame therefore never costs you a measurement, and the tag history is not full of images the nats path is optional leave it unconfigured and the inspection still runs and still publishes its readings what it puts on litmus edge one devicehub device with 15 tags covering the fill measurement, the inspection verdict and the line state a digital twin instance for the cell analytics groups behind the anomaly and drift figures frames land in datahub when nats is configured deploy services food beverage vision image us docker pkg dev/litmus customer facing/litmus solutions/food beverage vision 0 1 0 container name food beverage vision restart unless stopped ports \ target 4013 published 4013 protocol tcp \ target 5023 published 5023 protocol tcp environment \# fill these in edge url "${edge url }" edge api token "${edge api token }" sim host "${sim host auto}" apply on start "${apply on start 1}" edge verify tls "${edge verify tls 0}" http port "4013" modbus port "5023" \# optional frames to datahub nats url "${nats url }" nats token "${nats token }" pub group "${pub group fbvision}" pub layout "${pub layout datahub}" log level "info" edge url=https //10 0 0 5 edge api token=your token sim host=10 0 0 9 docker compose up d open http //localhost 4013 this is the largest image of the set, about 219 mb, because it carries the vision libraries the others are around 50 mb configuration variable default what it does edge url unset litmus edge to configure edge api token unset token for that edge or a username and password sim host auto address the edge polls to reach this solution apply on start 1 configure the edge on startup edge verify tls 0 1 checks the edge's certificate nats url unset litmus edge datahub, for frames optional nats token unset a datahub token not the same string as the api token above pub group fbvision topic group frames are published under pub layout datahub topic layout flat matches the upstream frame streamer convention line speed 4 how fast bottles pass the camera when running as an application hosted by litmus edge, nats url is 10 30 50 1 , which is the edge as seen from a container it hosts running beside the edge, it is the edge's own address what you see the camera view with the inspection overlay, the measured fill level per bottle, and the verdict beside it, the trend that the drift forecast is taken from faults let you drift the filler, introduce a fill anomaly, and degrade the image so you can see what the inspection does with a poor frame removing it docker compose down use clean up in the solutions provisioner # to remove what it created on the edge support support\@litmus io mailto\ support\@litmus io