[Solved] UnitV unable to find april-tags

  • I can detect april-tags with the StickV, but not with the UnitV AI camera. For the UnitV I use the same code, but without the LCD calls. Here's the code:

    import sensor
    import image  
    import math
    print("start script")
    sensor.set_framesize(sensor.QQVGA) # 160 x 120 pixel
    print("start loop...")
    while True: 
        tags = img.find_apriltags() # defaults to TAG36H11 without “families”.   
        if len(tags) > 0:
            for tag in img.find_apriltags(): # defaults to TAG36H11 without “families”. 
                #img.draw_rectangle(tag.rect(), color = (255, 0, 0))
                #img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0))
                degress = 180 * tag.rotation() / math.pi

    I have uploaded the latest firmware. What can be the reason that no april-tags are detected?

  • In addition to the code, here are some screenshots:

    M5StickV with the above code:
    As you can see, the april tags are detected correctly (output in the serial terminal)

    UnitV with the same code:
    No tags are detected...

    Same firmware, same MaixPy version, same code... But a different behavior...

  • OK, I found the cause: The image from the camera was mirrored. So the tag could not be detected. I found the error when I tried to detect QR codes:

    UnitV QRcode failure

    Then I added the following line of code to mirror the image:


    After that, the QR code was detected correctly:

    UnitV QRcode correctly

    Now, also april tags are working:

    UnitV april tag correctly

  • Nice one, what firmware are you using for the UnitV?

  • @kylebuttress Same as for the M5StickV

    downloaded here:

  • @hague thanks for the info that's a newer version than I have cheers

  • @hague good to see! Could you tell me how fast it can run? FPS and at resolution? Thanks!