<< return to Pixycam.com

Mass Color Sorting

I just ordered my 1st Pixy2 Camera. Can’t wait for it to get here.

I am building a BULK Lego sorting machine for myself, and decided to try out the Pixy2 as the camera for it. The plan is to use the Pixy2 to drive servo motors via Arduino or a Pi to direct the different colored parts into different shutes based on color.

My problem is… there are over 70 different colors of Legos. I need the camera to detect more than the 7 default color profiles… Is there any way to add MORE color profiles without using the “color code” system ?? It seems it should be pretty easy to get the camera to detect more then only 7 colors ???

If not… how about “Color Groups” ?? I have:
5 different shades of blue… Have a group called “Blues”
6 different shades of Orange… Have a group called “Oranges”

Then my next idea/question… Can the camera recognize 5 different shades of Blue ?? And make Color Tags " Blue" - “Sky Blue” - “Royal Blue” - “Sand Blue” etc ??

Then it becomes a 2 step process… Sort by “Color Group” then by “Actual Color”

Here is my actual Color Chart

Hello,
One thing you might consider is the getRGB() function:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:video_api

It allows you to get the RGB value as long as you know the x, y location within the image. (you can find the x, y location by using PixyMon.)

Hope this helps!

Edward

Ok… How do I save 70 different RGB values for PixyCam to be able to choose from?

Hello,
The RGB values would be stored and compared in your microcontroller. Are you using an Arduino?

Edward

Thinking about using a Raspberry Pi. and setting up TensorFlow AI now…
Any suggestions? I’m TOTALLY NEW to this whole Arduino/Pi/programming thing :slight_smile:

@Edge

Are there any examples of this multiple color values being saved on an Arduino ??
I know ZERO about coding, but can pick things up pretty quickly with examples. :slight_smile:
Thanks !!!
James

I did a little testing with the Pixy2Cam today.
It seems if you group a bunch of colors in a group, it will recognize them all as the same color. I took 5 Color Groups, and placed 2-8 shades into each color group. Then when you break them all apart, the software knows that each color belongs to the color group.

After that I started a new profile of only shades of green, and it was able to keep each shade of green separated (for the most part)

4

Not getting much input from anyone here… This forum still awake ?
Should I move it over the the LEGO section ??

Hello,
You can save values on the arduino using a simple array of values. If programming giving you troubles, you might have a friend help you with the programming.

Hope this helps!

Edward