<< return to Pixycam.com

Halloween Project - Character follows with his gaze


I decided to do a project for halloween (yes I am already starting now). I want to create a digital painting representing the portrait of a character. It will have several characteristics:

  1. He will follow the people who pass in front of him with his gaze
  2. Will scare people who watch it for too long
  3. Will scare people who stay too long in front

It would be this kind of work
From AtmosFX

For now my problem is the first point,The others surely concern the other components so I will go to ask on other forums if necessary.

Regarding following people, I have trouble coding because:

  1. I’m new to python
  2. I have to code on my Raspberry (Python) and run the camera and code through the Arduino (C, C ++) and I’m having a hard time

Regarding the other points, I have already succeeded in making the Raspberry and the Arduino communicate by flashing an LED when I was too close to the board but I cannot do better for the moment.

Thank you for your answers.

Best regards.

PS: For this project I am using a Raspberry Pi 3 Model B V1.2, an Arduino Mega (no more Uno), a Pixy 2 Camera and an Ultrasonic Sensor

Thanks for the message. The project sounds really cool! If you’re using a Raspberry Pi, you might consider using a standard webcam or raspberry pi camera that are good at providing raw video for your Pi to process.

Have you been to Pyimagesearch?

They have lots of great code that will run on your Pi and do more compute-intensive stuff like people detection. :slight_smile:

Hope this helps!



Thank you for your answer.

I have already tried with OpenCV and a Pi 2 camera, I was able to detect people, faces and eyes but I couldn’t make sure to follow people with my gaze, I couldn’t find anything about it and I couldn’t do it on my own.
So I asked on the OpenCV forum and I was advised Dlib but after some research and tries, what was required was much too high for my knowledge (I could not follow the tutorial …) and surely too much specific, something very basic would be sufficient for me.

My teacher therefore recommended the Pixy 2 to me because he had already made a robot with it and thought that it was surely a good idea.

Ah I surely found something (finally) on the site that you advised me:

I could surely make the red line a black dot (a pupil) that moves according to a detected person and not the ball.

I guess it is possible to define an area of ​​maximum pupil displacement (the eye area only).

Yes, if the person is wearing a certain color shirt, you can track the person with Pixy and at fast framerates which is good for tracking. :slight_smile:

The pan-tilt demonstration is a good example of fast tracking.

Hope this helps!