83 idle, winw, winh = helper.startFrame()
86 x, y, w, h = helper.drawInputFrame(
"c", inframe,
False,
False)
87 helper.itext(
'JeVois-Pro AprilTag detection')
90 ingray = inframe.getCvGRAYp()
97 results = self.
detector.detect(ingray)
103 (ptA, ptB, ptC, ptD) = r.corners.astype(float)
104 helper.drawLine(ptA[0], ptA[1], ptB[0], ptB[1], col)
105 helper.drawLine(ptB[0], ptB[1], ptC[0], ptC[1], col)
106 helper.drawLine(ptC[0], ptC[1], ptD[0], ptD[1], col)
107 helper.drawLine(ptD[0], ptD[1], ptA[0], ptA[1], col)
110 helper.drawCircle(float(r.center[0]), float(r.center[1]), 5, col,
True)
113 helper.drawText(float(r.center[0] + 7), float(r.center[1] + 7), str(r.tag_id), col)
116 jevois.sendSerial(
'ATAG' + str(r.tag_id) +
' ' + str(r.center[0]) +
' ' + str(r.center[1]))
119 fps = self.
timer.stop()
120 helper.iinfo(inframe, fps, winw, winh);