Description
■ Description
The PixyCam2 is a fast vision sensor for DIY robotics and similar applications. It is the second version of Pixy, which is faster, smaller and more capable than the original, adding line tracking/following algorithms as well as other features.
Here’s what we’ve added to Pixy2:
-
Pixy2 detects lines, intersections and small barcodes, intended for line-following robots
- Image sensor: Aptina MT9M114, 1296×976 resolution with integrated image flow processor
- Lens field-of-view: 60° horizontal, 40° vertical
-
Improved frame rate – 60 frames-per-second
-
Tracking algorithms have been added to color-based object detection
-
Connects to Arduino with included cable. Also works with Raspberry Pi, BeagleBone and similar controllers
-
All libraries for Arduino, Raspberry Pi, etc. are provided
-
C/C++ and Python are supported
-
Communicates via one of several interfaces: SPI, I2C, UART, USB or analog/digital output
-
Configuration utility runs on Windows, MacOS and Linux
-
Integrated light source
■ 60 Frames per Second
Pixy2 processes an entire image frame every 1/60th of a second (16.7 milliseconds). This means that you get a complete update of all detected objects’ positions every 16.7 ms. At this rate, tracking the path of falling/bouncing ball is possible. (A ball traveling at 40 mph moves less than a foot in 16.7 ms.) If your robot is performing line following, your robot will typically move a small fraction of an inch between frames.
■ Color Connected Components
Pixy2 uses a color-based filtering algorithm to detect objects called the Color Connected Components (CCC) algorithm. Pixy2 calculates the color (hue) and saturation of each RGB pixel from the image sensor and uses these as the primary filtering parameters. The hue of an object remains largely unchanged with changes in lighting and exposure.
The CCC algorithm remembers up to 7 different color signatures, which means that if you have 7 different objects with unique colors, Pixy2’s color filtering algorithm will have no problem identifying them. If you need more than seven, you can use color codes.
Pixy2 can find literally hundreds of objects at a time. It uses a connected components algorithm to determine where one object begins and another ends.
■ PixyMon Lets You See What Pixy2 Sees
PixyMon is an application that runs on Windows, MacOs and Linux. It allows you to see what Pixy2 sees, either as raw or processed video. It also allows you to configure your Pixy2, set the output port and manage color signatures. PixyMon communicates with Pixy2 over a standard mini USB cable.
■ Detecting Intersections & “Branching”
Pixy2 tells your program that it has detected an intersection ahead, how many branches are in the intersection and the angles of each branch. Your program can then decide which branch it wants to take and then communicate it to Pixy2. Pixy2 will then make the branch its new Vector line, and your robot will in essence “take the branch” by following the new Vector’s direction.