[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.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QQVGA) # 160 x 120 pixel sensor.run(1) sensor.skip_frames(30) print("start loop...") while True: img=sensor.snapshot() 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 print(tag.id(),degress)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:

Then I added the following line of code to mirror the image:
sensor.set_vflip(1)After that, the QR code was detected correctly:

Now, also april tags are working:

-
Nice one, what firmware are you using for the UnitV?
-
@kylebuttress Same as for the M5StickV
M5StickV_Firmware_v5.1.2.kfpkg
and
maixpy_v0.5.0_98_gbd7c7ab_m5stickv.bindownloaded here:
https://dl.sipeed.com/MAIX/MaixPy/release/master -
@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!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login