Pixy2 Camera Setup with Raspberry Pi

The Pixy2 Camera, like Dr. Szczecinski, sees EVERYTHING. Nah I'm just kidding... about the camera

What is a Pixy2 Camera?

The PixyCam2 has an integrated filtering system which allows it to be trained to identify specific color hues and color patterns. It then returns the central coordinate position of the object that it identifies to the computer using the coordinate system depicted below.

Pixy 2 Camera Coordinate System

The Pixy2 Camera will identify objects it has been trained to see and view them as seen below by placing a square over the identified color signature then return the coordinate position of the center of that square.

Pixy 2 Camera Object Identification

The pixy2 cameras have a field of view of approximatly 87ΒΊ and can identify objects reliably up to 90 centimeters away.

Pixy2 and Raspberry Pi Setup

When setting up your pixy2 camera with a Raspberry Pi you need to install the libpixyusb2 software library. Instructions to install this on a Raspberry Pi are available in the link below:

How to install libpixyusb2

It is highly encouraged that you utilize the examples described in the above link, as they are easy, simple ways to learn about the capabilites of the pixy2 camera. These examples are also a great starting point for making your own custom program.

Teaching Pixy2 Camera an Object

The whole point of the Pixy2 Camera is to identify objects so make sure you pay attention to this step. That being said, it is a super simple process, and if you follow the link below you will be able to track objects of interest with ease.

How to teach Pixy2 Camera an object

Notes

  • We have not yet figured out how to run two pixy2 cameras on simultaneously on a single raspberry pi, but this link may be you a good place to start. I tried most if not all of the tips on this page without success, but that's not to say it won't help you. Godspeed.

  • If the pixy2 cam is having trouble identifying the specified color, use the color tuning described in the "How to teach Pixy2 Camera an object" link. The lower you make the signature range, the more stringent the Pixy2 Camera is when identifying a hue.

Last updated

Was this helpful?