Description
■ Description
The PixyCam2.1 is a fast vision sensor for DIY robotics and similar applications. It is an improved version of PixyCam2, which includes:
- Wider field-of-view : The new version has an 80 horizontal degree field-of-view while the previous version had a 60 degree field-of-view. Most users want the larger field of view because of the ability to see more of the environment per image. There is some spherical distortion with the new lens, which comes with the wider field-of-view.
- Replaceable lens : the M12 lens mount allows the user to substitute a different lens if they wish
- Adjustable focus : the M12 lens has an adjustable focus that allows focusing on objects at practically any distance, including as close as 0.25”.
- Less chromatic distortion : the new lens has virtually no chromatic distortion at the edges, whereas the previous Pixy version had measurable chromatic distortion.
- Less pixel noise : the new lens has an F-stop of 2.0 vs the previous lens which had an F-stop of over 3.0. This means better light gathering ability, more signal and less noise for a given amount of ambient light. Less noise means better detection accuracy for this new Pixy version.
And, everything else about PixyCam 2.1 is the same — software, firmware and feature set. PixyCam 2.1 is slightly larger, however, adding 0.25 inches to the height and depth of the camera versus PixyCam 2.
■ 60 Frames per Second
Pixy2.1 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.1 uses a color-based filtering algorithm to detect objects called the Color Connected Components (CCC) algorithm. It 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.1’s color filtering algorithm will have no problem identifying them. If you need more than seven, you can use color codes.
Pixy2.1 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.1 Sees
PixyMon is an application that runs on Windows, MacOs and Linux. It allows you to see what Pixy2.1 sees, either as raw or processed video. It also allows you to configure your Pixy2.1, set the output port and manage color signatures. PixyMon communicates with Pixy2.1 over a standard mini USB cable.
■ Detecting Intersections & “Branching”
Pixy2.1 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.1. It 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.