This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:v2:using_color_codes [2018/06/08 00:41] pixycam |
wiki:v2:using_color_codes [2018/06/08 01:04] pixycam |
||
---|---|---|---|
Line 8: | Line 8: | ||
==== Introduction ==== | ==== Introduction ==== | ||
- | So, what’s a “color code”? A color code (CC) is two or more color tags placed close together. Pixy can detect and decode CCs and present them as detected objects. | + | So, what’s a “color code”? A color code (CC) is two or more color tags placed close together. Pixy2 can detect and decode CCs and present them as detected objects. |
{{wiki:img:35119fecded9e123af00cd80ab41301333ccd450.jpg}} | {{wiki:img:35119fecded9e123af00cd80ab41301333ccd450.jpg}} | ||
- | For example, using 2-tag CCs (like the photo above) and limiting yourself to a palette of 4 colors (i.e. teaching Pixy2 4 different color signatures), you can generate up to 12 unique objects. That's just the tip of the iceberg - 3, 4, and 5-tag CCs with more / different colors allow for many, many more unique objects. Pixy2 will detect and report color codes with up to 5 tags arranged in a line. With 5 tags, thousands of unique codes are possible. | + | For example, using 2-tag CCs (like the photo above) and limiting yourself to a palette of 4 colors (i.e. teaching Pixy2 4 different color signatures), you can generate up to 12 unique objects. 3, 4, and 5-tag CCs with more / different colors allow for many, many more unique objects. Pixy2 will detect and report color codes with up to 5 tags arranged in a line. With 5 tags, thousands of unique codes are possible. |
Line 19: | Line 19: | ||
CCs are useful if you have lots of objects you want to detect and identify -- more than could be detected with the seven separate color signatures alone. CCs also improve detection accuracy by decreasing false positive detections. That is, there is a lower probability that specific colors will occur both in a specific order and close together. The drawback is that you need to place a CC on each object you’re interested in detecting. Often the object you’re interested in (yellow ball, purple toy) has a unique color signature and CCs aren’t needed. Objects with CCs and objects without CCs can be used side-by-side with no problems, so you are free to use CCs for some objects and not others. | CCs are useful if you have lots of objects you want to detect and identify -- more than could be detected with the seven separate color signatures alone. CCs also improve detection accuracy by decreasing false positive detections. That is, there is a lower probability that specific colors will occur both in a specific order and close together. The drawback is that you need to place a CC on each object you’re interested in detecting. Often the object you’re interested in (yellow ball, purple toy) has a unique color signature and CCs aren’t needed. Objects with CCs and objects without CCs can be used side-by-side with no problems, so you are free to use CCs for some objects and not others. | ||
- | CCs also give you an accurate angle estimate of the object (in addition to the position and size). This is a “freebie” that some applications may find useful. The angle estimate, decoded CCs, regular objects and all of their positions and sizes are all provided at 50 frames per second. | + | CCs also give you an accurate angle estimate of the object (in addition to the position and size). This is a “freebie” that some applications may find useful. The angle estimate, decoded CCs, regular objects and all of their positions and sizes are all provided at 60 frames per second. |
CCs might be particularly useful for helping a robot navigate. For example, an indoor environment with CCs uniquely identifying each doorway and hallway would be both low-cost and robust. | CCs might be particularly useful for helping a robot navigate. For example, an indoor environment with CCs uniquely identifying each doorway and hallway would be both low-cost and robust. | ||
Line 25: | Line 25: | ||
==== Getting Pixy2 to track Color Codes ==== | ==== Getting Pixy2 to track Color Codes ==== | ||
- | |||
- | Here is a good video on color codes: | ||
- | |||
- | {{youtube>LDF0GCqES4U?480x360)}} | ||
- | |||
In order to get color codes working on Pixy2, you need to do the following: | In order to get color codes working on Pixy2, you need to do the following: | ||
- | - Make sure that the **Color code mode** parameter in the **Expert** tab is not 0 (disabled). (It should be 1 [enabled] by default.) | + | - Run the _color\_connected\_components_ program by selecting it in the **Program** menu |
+ | - Make sure that the **Color code mode** parameter in the [[wiki:v2:cc_expert|_Expert tab_]] is not disabled. It should be enabled by default. | ||
- Teach Pixy2 the color code signatures needed for the color codes you are using. | - Teach Pixy2 the color code signatures needed for the color codes you are using. | ||