Arduino with camera and image processing

Hey,

I would like to connect my arduino uno with a camera but I'm not sure how to proceed, I would like to use the camera to get the state of a rubicks cube.
So i was thinking about some different approaches an not sure which one is the best, for what I have read I can't use the arduino with a usb webcam(ps2 eyetoy). Then I was thinking about using an old phone(Samsung galaxy s i9000) as an camera and image processing since the arduino can't handle that(?) and if I was to use my phone how should I do that? I looked some at IOIO, or what's a good way? Or should I just buy a camera but then which one fits my need? I also looked at Pixy but they seem quite expensive.

Maybe somewhat vague post and I'm not sure if this is the place to ask. Feel free to ask questions, I would appriciate some help.

An Arduino does not have the memory or the speed for image processing. Consider using a RaspberryPi.

Another possibility might be an ESP32-CAM. It would be much cheaper but it is not as powerful as an RPi.

...R

Well since I only really need to process 9 pixels I thought it might be possible?

Define “process”.
Define “pixel”

Hultarn:
Well since I only really need to process 9 pixels I thought it might be possible?

I don't know where you are going to get a 9 pixel camera.

...R

TheMemberFormerlyKnownAsAWOL:
Define "process".
Define "pixel"

Since I want to get the state of a rubicks cube I only need to check the color of 9 pixels, one for each block.

Hultarn:
Since I want to get the state of a rubicks cube I only need to check the color of 9 pixels, one for each block.

How will you locate those 9 pixels in the image?

Delta_G:
How will you locate those 9 pixels in the image?

The cube will always be in the same position relative to the camera, so I thought I could just use some preset positions

So you have much experience of image capture systems?

Maybe get a "color sensor" like this: RGB Color Sensor with IR filter and White LED - TCS34725 : ID 1334 : $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits
and use that to determine the color of each block. Make a little arm out of servos
to move the sensor around as needed.

Or... make your own 9 pixel camera with a PCB the exact size of your rubics cube with 9 of those sensors.

TheMemberFormerlyKnownAsAWOL:
So you have much experience of image capture systems?

Not really

John_S:
Maybe get a "color sensor" like this: RGB Color Sensor with IR filter and White LED - TCS34725 : ID 1334 : $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits
and use that to determine the color of each block. Make a little arm out of servos
to move the sensor around as needed.

Or... make your own 9 pixel camera with a PCB the exact size of your rubics cube with 9 of those sensors.

Thanks för your suggestion, I will look more Into that.

But say I would like to use my phone to take a picture and process it to a 3x3 array that I send to the arduino. What would be a good way to do that?

Look into a device called pixy. It seems to be made for that kind of application, and its output can be interpreted by Arduino in real time.

Hultarn:
But say I would like to use my phone to take a picture and process it to a 3x3 array that I send to the arduino. What would be a good way to do that?

Use the phone to figure out the positions of the colours and then send a message to the Arduino to tell it the result.

The computer in a phone is enormously more powerful than an Arduino.

...R

Robin2:
Use the phone to figure out the positions of the colours and then send a message to the Arduino to tell it the result.

The computer in a phone is enormously more powerful than an Arduino.

...R

Yes, but how will I send that message?

Hultarn:
Yes, but how will I send that message?

Bluetooth or WiFi ?

Bluetooth is probably simpler as it is just serial-by-wireless. A message for the colours on one face of the cube could be
<G,G,G,G,Y,B,G,B,B> where G = green, Y = yellow and B = blue.

Have you searched the Forum for Rubik’s Cube projects - I’m pretty sure I came across a very extensive Thread about it a couple of years ago.

…R