Skip to content

Label Reader API

taufflie edited this page Aug 3, 2022 · 5 revisions
  1. Architecture of the label reader API
  2. Reading the logs
  3. Label_regular vs label_specific
  4. Output of the Python Server in label_regular

Architecture of the label reader API

OGrEE-AR backend flowchart

Reading the logs

How is label_regular working?

label_regular vs label_specific

label_regular is set to work for any use case by not doing any correction to the text read with esayOCR. Hence, they are less precise but can be adapted to another regular expression. label_specific is including a number of corrections to the text specific to our use case. It is more precise in our case but cannot be adapted to another regular expression in an easy way. Please note that label_specific was the previous version of label_regular and thus has less detailed logs while having messier code.

Output of the Python Server in label_regular (ogLabelServer.py)

The current output of the python server is a JSON with the following information:

{
    "site": site,
    "room": label[0],
    "rack": label[1],
}

with site referring to the site provided in the Unity application and label the list containing the text corresponding to each part of the regular expression provided. In our case, label[0] refers to the room, and label[1] refers to the rack. To adapt this code, one needs to adapt the dictionary built in the ogLabelReader.py file.

Clone this wiki locally