Pages: [1]   Go Down
Author Topic: Controll servo by webcam  (Read 1372 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink
Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 6
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: November 29, 2010, 12:47:07 pm by newman » Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A site that might be of interest.

http://www.roborealm.com/
Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 6
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 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
« Last Edit: December 01, 2010, 11:28:00 am by newman » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

So your answer is yes.
Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 6
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So your answer is yes
  :-[ :-[
perhaps i was going in too much  smiley-wink
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-[
Logged

Pages: [1]   Go Up
Jump to: