不同预定义ArUco字典的优缺点及小量标记选型咨询
Great question! Let’s break this down clearly since you only need ~10 markers—this simplifies things way more than if you needed hundreds of unique tags. First, let’s clarify the key parameters that matter for your use case:
Core Dictionary Parameters to Care About
- Bit Size: The dimensions of the marker (e.g., 4x4, 5x5, 6x6, 7x7) — this determines how big the marker needs to be printed, and how much computational power is needed to detect it.
- Hamming Distance: The minimum number of bit differences between any two markers in the dictionary. This is what directly affects error recognition probability (higher = harder to mix up markers by mistake).
- Total Marker Count: How many unique tags are in the dictionary (you only need 10, so most pre-defined dictionaries will have way more than enough).
Pros & Cons of Common Pre-Defined Dictionaries
Let’s go through the most relevant options for your needs:
1. Small Bit Size (4x4 Series: DICT_4X4_50, DICT_4X4_100)
- Pros:
- Markers are tiny — perfect for small objects, long-distance detection, or scenarios where you don’t have much space to print tags.
- Fastest to detect and decode, since there are fewer bits to process. Great for low-power devices or real-time applications with tight latency.
- Cons:
- Lowest Hamming Distance (fixed at 2 for all 4x4 pre-defined dictionaries). This means if even 2 bits get corrupted (from blur, glare, or partial occlusion), the system might misidentify a marker as another one.
- Total count is smaller (max 100 for 4x4), but that’s irrelevant for your 10-tag need.
2. Medium Bit Size (5x5 Series: DICT_5X5_50, DICT_5X5_100; 6x6 Series: DICT_6X6_100, DICT_6X6_250)
- Pros:
- Higher Hamming Distance (3 for 5x5, 4 for 6x6). This makes them much more robust to noise, blur, or partial occlusion — way lower chance of misidentifying tags.
- Total marker counts are massive (5x5 has up to 250, 6x6 up to 1000), so you’ll never run out of tags even if you expand later.
- Marker size is still manageable for most use cases — not too big, not too small.
- Cons:
- Slightly slower to process than 4x4 markers, but modern phones/laptops/embedded boards (like Raspberry Pi) handle this without breaking a sweat.
- Need a bit more space to print compared to 4x4, but this is rarely an issue unless you’re working with extremely tiny objects.
3. Large Bit Size (7x7 Series: DICT_7X7_1000, DICT_7X7_2000)
- Pros:
- Highest Hamming Distance (5 for 7x7 pre-defined dictionaries) — almost immune to minor corruption or occlusion.
- Tons of markers (up to 2000), so future expansion is trivial.
- Cons:
- Markers are significantly larger — not feasible for small objects or tight spaces.
- Slowest to process (though again, modern hardware handles it, but why waste cycles when you don’t need to?).
- Overkill for your 10-tag requirement — you’re paying for features you won’t use.
Responding to Your Initial Thought
You mentioned: "标记数量越少,标记间距离越小,错误识别标记ID的概率越高,但可用的唯一标记最大数量……"
This is partially correct, but let’s clarify: The Hamming Distance (marker-to-marker bit difference) is fixed for all pre-defined dictionaries of the same bit size. For example, all 4x4 dictionaries (whether they have 10, 50, or 100 markers) have a minimum Hamming Distance of 2. It’s not that fewer total markers = smaller distance — the dictionary is designed to maintain a consistent minimum distance regardless of total count.
If you were generating a custom dictionary, you could potentially get a higher Hamming Distance with only 10 markers, but pre-defined dictionaries already optimize this balance for general use cases.
My Recommendation for Your Use Case
- If you need tiny markers or have limited hardware: Go with
DICT_4X4_50. Even with the lower Hamming Distance, 10 markers are manageable, and the small size is a huge plus. - If robustness is your top priority (e.g., outdoor use, variable lighting, partial occlusion): Pick
DICT_5X5_50orDICT_6X6_100. The higher Hamming Distance will drastically reduce misidentification chances, and the marker size is still reasonable. - Skip 7x7 entirely — it’s overkill for 10 tags, and you’ll gain nothing but larger markers and slightly slower processing.
内容的提问来源于stack exchange,提问作者Incanus

