TODO (Note to myself) #1
Replies: 6 comments
-
Information will be updated here as soon as I change anything |
Beta Was this translation helpful? Give feedback.
-
Update 14/4/2024: Add option to dump raw frames to SD card for debugging + add script for converting raw images to readable formats. |
Beta Was this translation helpful? Give feedback.
-
NOTE 15/4/2024: It's a trade between resolution/range and speed. You can increase the resolution (to SVGA for me) to detect small tags at further distance. |
Beta Was this translation helpful? Give feedback.
-
NOTE 16/4/2024: Sample of pose estimation log on UART (
Correct me if I'm wrong:
|
Beta Was this translation helpful? Give feedback.
-
NOTE 16/4/2024: Example output of
|
Beta Was this translation helpful? Give feedback.
-
I think it's all done. I will close the discussion now but feel free to comment if you would like. |
Beta Was this translation helpful? Give feedback.
-
Device: AI Thinker ESP32-CAM running @ 240MHz with 4MB (actually 8MB but 4MB was unused) RAM and 4MB SPI flash.
Current status
simple_tag_detect
:Good:
16h5
and25h9
family.SVGA
resolution, 150ms (single-thread) inVGA
resolution and under 100ms (single-thread) inHVGA
resolution. Both16h5
and25h9
and36h11
have about the same processing time under the same conditions.25h9
and36h11
, the issue is much reduced, now almost no false detection.Bad:
Accuracy (described above)Improved by switching to36h11
family.Cannot useUPDATE:36h11
due to its memory requirement. Other tag families not listed here are not tested.36h10
and36h11
families now work. See commit 5946838 for more information.pose_estimation
:Good:
simple_tag_detect
Bad:
simple_tag_detect
Estimated pose is not correct. Maybe this is due to my bad calibration.No longer an issue.What to do?
I tested it and the speed is the same. Will need further investigation.UPDATE: 2 threads enabled. Performance doubled compared to single-thread. The optimal number is 2 threads (tested).double
tofloat
(since ESP32 only support native single-precision math, and double precision calculation is done in software). Performance is double inHVGA
mode, but I increased it toVGA
mode, so the performance is about the same, but the resolution is double.Replace functions inUPDATE: compared using Godbolt, found unneeded sincecommon/matd.c
(and maybe other files) with optimized functions fromesp-dsp
library.-Ofast
produce quite similar code.Z pose (distance) seems correct (error margin 1-2cm), while X pose and Y pose seems incorrect. Need further testing.All are correct, but they are position of the tag in the camera's coordinate system. You will need to convert it to camera's pose if you want to.Beta Was this translation helpful? Give feedback.
All reactions