Go Down

Topic: Controll servo by webcam (Read 1 time) previous topic - next topic

Goemans

Hi,

I am just a starter with processing and the Arduino and I wonder if anyone can help me with my challenge.

For a design project at the University of Technology I, a third year student Industrial Design, am trying to control a servo motor with a web-cam.

To be more specific; I want use the web-cam to get the position of the person moving in front of it (in a value from 0-total left till 255-total right?). I want to use this value to rotate the servo motor which will control the direction of a lamp.

I really don't know where to start, so could you please help me?

Mats

Grumpy_Mike

Start off by connecting your web cam to processing, there are libraries that will do this. Then work out how to detect movement from the web cam. You might want to look at frame subtraction, that is subtracting successive frames, no movement shows up as zero (or close to it). Then calculate the position. Only then do you need to send that position down the serial port to the arduino which just takes numbers from the serial port and drives the servo to that position.

I hope I get a good mark.  ;)

jada

#2
Nov 29, 2010, 06:46 pm Last Edit: Nov 29, 2010, 06:47 pm by newman Reason: 1
well you came to the correct place
this shows you how to interface a servo to arduino
http://www.arduino.cc/en/Reference/Servo
coming to the software part i think you need to post here
http://forum.processing.org/#home
Quote
I hope I get a good mark.  

:-X

zoomkat

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Goemans

I am not sure of how to give a mark. But i thank you all for these first pointers. I just found out my web-cam broke down, so after buying a new one I'll try again. And i will surely post again with new question. Thnx a lot!!

Goemans

Just a quick question....

Can i use the program provided on the arduino site to do all this? Or do i have to download the processing program on processing.org?


jada

#6
Dec 01, 2010, 05:27 pm Last Edit: Dec 01, 2010, 05:28 pm by newman Reason: 1
arduino is the smaller side of the project the main task is to process the image on whatsoever software then its just a matter of sending in a value to the servo over the serial connection

Grumpy_Mike

Quote
Or do i have to download the processing program on processing.org?


So your answer is yes.

jada

Quote
So your answer is yes
:-[ :-[
perhaps i was going in too much  ;)

Goemans

yes i can do it with the program provides by the arduino.cc website...or yes, i need to download the processing program on processing.org?

i'm sorry, i know i'm a noob :-[

Go Up