Академический Документы
Профессиональный Документы
Культура Документы
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
FaceTrackingwithaPan/TiltServoBracket
byzagGrad|July15,2011|96comments
SkillLevel:Beginner
Overview
Inthistutorialwe'regoingtolookathowtouseOpenCV,arealtimecomputervisionlibrary,withProcessing,
Arduino,awebcamandapan/tiltbrackettocreateavideothatwillkeepapersonsfaceinthemiddleofthe
frameastheywalkaroundtheroom.AvideoofthefinalproductillustratestheconceptalittlebetterthanIcan
explainit.
SoftwareRequired
Arduino
Processing
OpenCVFramework(Windows,Mac,Linux)
OpenCVProcessingLibrary
FirmwareRequired
OpenCVExamples
SerialServoControlSketch
FaceTrackingProcessingApp
HardwareRequired
ArduinoUno(orother5VArduinoCompatibleboard)
https://www.sparkfun.com/tutorials/304
1/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Pan/TiltServoBracket
Webcam
USBCable
9VDCPowerAdapterforArduino
Breadboard
JumperWires
MaleHeaderPins(2x3pinlengths)
AssemblyGuide
Thereareseveralpiecesforthisprojectthatneedtobeassembled.StartbyputtingthePan/TiltBracket
togetherusingtheassemblyguidefromtheproductpage.Thiswillshowyouhowtoputthebrackettogether
andinstalltheservosforcontrollingthebracket'sorientation.
OncethePan/TiltBrackethasbeenassembledweneedtofindawaytomountthewebcamontothebracket.
I'musingaLogitechWebcamthatwelyingaroundtheoffice.Itcameonthislittlemountingswivelsothatyou
canhangitfromthetopofamonitor.
https://www.sparkfun.com/tutorials/304
2/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Ifiguredthatthecamerahadtobemountedontoit'sbracketsomehow,soifIcouldtakeitoutofthecurrent
bracketitmightmakeiteasiertomounttothepan/tiltbracket.Aftertakingoutahandfulofscrews,andpulling
apartsomeratherreluctantplastic,IwasluckytofindthatthereweresomesmallmetalswivelsthatIcould
mountthecamerawith.
https://www.sparkfun.com/tutorials/304
3/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Theonlythingleftwastofigureouthowtomounttheswivelsontothebracketinafashionthatwouldallowthe
cameratobeputbackontotheswivels.Sincethereareatonofcutoutsinthepan/tiltbracketitwasn'ttoo
difficult.Ifoundsomesmallscrewstomounttheswiveltothebracket.Unfortunatelythescrewswerejustatad
toobigtofitthroughtheholesintheswivel,soIenlargedthemabitwithadrillpress.Aftermakingtheholes
biggerIjustmountedbothswivelstooneedgeofthebracket,andthenwithalittlebitofwigglingIgotthe
webcambackontotheswivels.
Ifyoudon'thavethesamewebcamyou'llhavetofindyourownwaytomountthewebcamtothepan/tilt
bracket.Don'tbeafraidofalittleDuctTape!Onethingtocheckbeforemountingthecameratothebracket,
though,istherangeofmotionofthepan/tilt.Iwantedthecameratohavethewidestrangeofmotionpossible
whentracking,soIfoundthemidpointofthepanandtiltangles,andthenmountedmycamerasothatthelens
wasfacingforward.Tofindthemidpointofthepan/tiltrangeofmotionjustmanuallymovethebracketfrom
sidetoside,andupanddownandapproximatethecenterpositionforeachaxis.
https://www.sparkfun.com/tutorials/304
4/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Nowthatthecamerajigissetupweneedtoassembletheelectronics.SincetheArduinoiscapableofproviding
enoughpowerfortwoservos,there'snotmuchtotheassemble.AllweneedisanArduino,abreadboard,a
couple3pinMaleHeaderstrips,andsomewire.Thefritzingdiagrambelowillustrateshowtoconnecttheentire
setup.Justtrytomakesurethatyouplugthewireforthepanservo(leftandrightmovement)intopin2of
Arduino,andplugthewireforthetiltservo(upanddownmovement)intopin3.
https://www.sparkfun.com/tutorials/304
5/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Everythingshouldnowbeassembledandreadytogo.Thingsareabitmessy,butthey'llwork.
Installingthesoftware
Beforewecangetstartedwiththecodeforthisprojectthereareacoupleofsoftwareprogramsthatneedtobe
installed.Firstandforemost,ifyoudon'thaveArduinoinstalledyou'llneedtogogetit.Therearegreat
instructionsforinstallingthesoftwareonanyOSrightontheArduinodownloadpage.Youalsoneedtoinstall
Processing,whichisverysimilartoArduino,butmadeforwritingprogramsforacomputer(like,areal
computer)ratherthanforArduino.Processingalsohasgreatinstallationinstructionsforeveryoperatingsystem.
https://www.sparkfun.com/tutorials/304
6/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Thebrainsofthisproject,though,comefromOpenCV.OpenCV(OpenComputerVision)isalibraryforreal
timeimageprocessing.Itactuallyallowsyoutodoallsortsofcoolthings,butwe'regoingtouseitfordetecting
faces.IfyoureadtheOpenCVwebpageyou'llnoticethattheonlythingsthatarereallysupportedareC,C++
andPython.Howeveraquickgooglefor"OpenCVProcessing"foundaprojectfromagroupthathascreatedan
OpenCVlibraryforProcessingandJava.
InordertouseOpenCVwithProcessingwe'llneedtoinstalltheOpenCVFrameworkandtheOpenCV
ProcessingLibrary.We'llalsodownloadtheOpenCVProcessingExamplessowecangetaheadstartonwriting
thecode.TheOpenCVforProcessingandJavasitehasgoodinstructionsonhowtogetthesethingsinstalled.I
copiedtheseinstructionsfromthem.
StartbyinstallingtheOpenCVFrameworktoyourcomputer.Ifyou'reusingWindows,downloadtheinstaller
fromthesourceforgepagefortheproject.MakesureyoudownloadOpenCV_1.0.exe,notthezipfile.Andyes,
therearenewerversionoftheOpenCVFramework,buttheydon'tworkwithOpenCVforProcessing,somake
suretodownloadversion1.0.Whenyouruntheinstaller,makesureyouagreetohavetheOpenCVdirectory
addedtoyoursystempath.You'llneedtorebootafterinstallinginorderforthesystemchangestotakeaffect.If
you'reusingaMac,justdownloadtheOpenCVimageandfollowtheinstallerinstructions.Finally,ifyou'rea
Linuxuser,download/compile/installthesourcefilesforOpenCV.
OncetheOpenCVframeworkisinstalled,theOpenCVProcessinglibrarystillneedstobeinstalledinorderto
useOpenCVfromProcessing.JustdownloadtheOpenCVProcessingLibraryandmoveittoyourProcessing
librariesfolder.ThelibrariesfolderresidesinsidetheProcessingsketchbookfolder.Youcanfindthesketchbook
folderbyopeningProcessing,thengoingtoFile>Preferences.MakesuretoextracttheOpenCVlibraryfolder
intothelibrariesfolder,don'tjustputthezipfileintothefolder.
FinallytheOpenCVProcessingexamplesneedtobedownloaded.EithercreateafolderinsidetheOpenCV
Libraryfoldercalled'examples'orjustputtheexamplesintotheProcessingsketchbook.Again,makesurethe
zipfileisunzippedintooneofthesefolders.
OncetheOpenCVProcessingexamplesareinstalled,andArduino,Processing,OpenCVFrameworkandthe
OpenCVProcessinglibraryhaveallbeeninstalled,we'vegoteverythingweneedtofinishtheproject.
WritingtheCode
Bynowyou'vegotthePan/TiltBracketwithaWebcammountedontoit,andalloftherequiredsoftwarehas
beeninstalled.Ifyouwatchedthevideoatthebeginningofthetutorialyoushouldhaveageneral
understandingofwhatthisprojectwilldo.Basicallytheservosaregoingtomovethewebcamandkeepthe
subjectsfaceinthecenterofthevideofeed.Pragmaticallyspeaking,Processingtakesthevideoinputfromthe
webcamandusestheOpenCVlibrarytoanalyzethevideo.Ifafaceisdetectedinthevideo,theOpenCVlibrary
willgivetheProcessingsketchthecoordinatesoftheface.Theprocessingsketchwilldeterminewheretheface
islocatedintheframe,relativetothecenteroftheframe,andsendthisdatathroughaserialconnectiontoan
Arduino.TheArduinowillusethedatafromtheProcessingsketchtomovetheservosconnectedtothePan/Tilt
bracket.Let'sstartbytakingalookattheArduinosketch,whichiscalledSerialServoControl.
ArduinoSketch:SerialServoControl
Ifyouhaven'talreadygrabbedtheArduinofirmwareforthisproject,goaheadanddownloadthe
SerialServoControlsketchandsaveittoyoursketchbook.Onceyou'vedownloadedit,openthesketchin
Arduino,startbyreadingthecommentsectionatthetop.Basicallythissketchwillanalyzeaserialinputfor
commandsandsettheservopositionsaccordingly.Thecommandstructurefortheserialcommandsissimple.
Acommandconsistsoftwobytes:aservoIDandaservoposition.IftheArduinoreceivesaservoID,thenit
waitsforanotherserialbyteandthenassignsthereceivedpositionvaluetotheservoidentifiedbytheservoID.
https://www.sparkfun.com/tutorials/304
7/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
#include<Servo.h>//UsedtocontrolthePan/TiltServos
//ThesearevariablesthatholdtheservoIDs.
chartiltChannel=0,panChannel=1;
//Thesearetheobjectsforeachservo.
ServoservoTilt,servoPan;
//ThisisacharacterthatwillholddatafromtheSerialport.
charserialChar=0;
voidsetup(){
servoTilt.attach(2);//TheTiltservoisattachedtopin2.
servoPan.attach(3);//ThePanservoisattachedtopin3.
servoTilt.write(90);//Initiallyputtheservosboth
servoPan.write(90);//at90degress.
Serial.begin(57600);//Setupaserialconnectionfor57600bps.
}
TheArduinoServolibraryisusedtoeasilycontrolthepanandtiltservos.Therearen'tthatmanyvariablesa
coupleareusedtokeeptrackoftheservoIDvaluesforeachservo,andthenanobject(orinstance)iscreated
foreachservo.Finallythere'sacharactervariablethatwillbeusedtokeeptrackofthecharactersthatcomein
ontheSerialport.
Inthesetupsection,wetelltheArduinowhichpinshavetheservosattachedtothem.Inthiscase,we'retelling
theArduinothatthetiltservoisattachedtopin2andthepanservoisattachedtopin3.Makesurethatthis
reflectshowthehardwareisactuallyconnectedinyoursetup.Ifyougetitwrong,it'seasytofix.Justrelocate
thewires.AftertellingtheArduinowheretheservosareconnected,wesettheinitialpositionoftheservostobe
90degreesthisisjustsothatthesetupgoesbacktoagoodstartingpointeverytimetheArduinopowersup.
Finally,inordertousetheserialportwesetuptheconnectionwiththeSerial.begincommandthissketchwill
beusinga57600bpsbaudrate.
serialChar=Serial.read();//Copythecharacterfromtheserialporttothevariable
if(serialChar==tiltChannel){//ChecktoseeifthecharacteristheservoIDforthet
while(Serial.available()<=0);//Waitforthesecondcommandbytefromtheserialport
servoTilt.write(Serial.read());//Setthetiltservopositiontothevalueoftheseco
}
elseif(serialChar==panChannel){//Checktoseeiftheinitialserialcharacterwasthe
while(Serial.available()<=0);//Waitforthesecondcommandbytefromtheserialpor
servoPan.write(Serial.read());//Setthepanservopositiontothevalueofthesecon
}
//IfthecharacterisnotthepanortiltservoID,itisignored.
}
TheloopsectionoftheSerialServoControlsketchisalsoprettyshort.Basicallywewaitforacharactertocome
inontheserialport,andweonlyactifthecharacterisanIDforoneoftheservos.Becauseofthecommand
structure,thenextbytetocomefromtheserialportshouldbetheservopositionforthepreviouslysentservo
ID.Sothesketchwaitsforanothercharacterfromtheserialport,andwhenitarrivestheservopositionis
updatedtothevaluereadfromtheserialport.Simple!
https://www.sparkfun.com/tutorials/304
8/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
ProcessingSketch:FaceDetectionExample
TheOpenCVframeworkisverypowerful,andpowerfulframeworkstendtobeabitintimidatingtoworkwith.
LuckilytheOpenCVProcessingLibrarycomeswithcoupleexamplesketchesshowingushowtoworkwiththe
library.MakesureyouhavetheOpenCVProcessingLibraryinstalled,aswellastheOpenCVProcessing
Examples.Opentheexamplenamed"face_detection."WhenIwasfirstexploringtheexamplesIdidn'tknow
what"face_detection"actuallydid,butitsoundedpromising.
Makesureyouhaveawebcampluggedinbeforerunningthesketch.Onceyourwebcamispluggedingo
aheadandrunthesketch.Whathappens?Youshouldseejustastreamingvideofromthewebcam.Nothing
special.Bummer.Butwait!Ifyoucheckouttheprogramoutputintheprocessingwindow,thetoplinehasan
errormessage.Theerrormessagereads"Thehaarclassifiercascadefile'haarcascade_frontalface_alt.xml'
cannotbefoundinfolders,youmustspecifythefullpathinstead."Ok,soIdon'tknowwhatahaarclassifier
cascadeis,butIdoknowthatthiserrormessageisindicatingthatthesketchfolderismissingafile.Tocorrect
thiserror,youneedtofindthe'haarcascade_frontalface_alt.xml'fileintheOpenCVFrameworkdirectory.The
fileshouldbein'.../OpenCV/data/haarcascades.'JustcopytheXMLfilenamed
'haarcascade_frontalface_alt.xml'andpasteitintothe"face_detection"sketchfolderinyourProcessing
Sketchbooklibrariesfolder.
GobacktoProcessingandrunthesketchagain(closethesketchifit'sstillopen).Now,ifyou'refaceisinthe
webcam'sfieldofview,youshouldseeacoloredrectangleoutliningyourface.Awesome!Youmightalsonotice
thatifyouclickanddraginsidethewindowthebrightnessandcontrastwillchange.Let'scheckoutthecodeto
seewhatinformationwecangetthatmighthelpuscontrolaservo.Keepinmind,I'mnoexpertonOpenCV,so
we'relearningthistogether.
importhypermedia.video.*;
importjava.awt.Rectangle;
OpenCVopencv;
//contrast/brightnessvalues
intcontrast_value=0;
intbrightness_value=0;
voidsetup(){
size(320,240);
opencv=newOpenCV(this);
opencv.capture(width,height);//openvideostream
opencv.cascade(OpenCV.CASCADE_FRONTALFACE_ALT);//loaddetectiondescription,here
//printusage
println("DragmouseonXaxisinsidethissketchwindowtochangecontrast"
println("DragmouseonYaxisinsidethissketchwindowtochangebrightness"
Intheinitializationandsetupsectionstheredoesn'tseemtobeanythingtoocomplexgoingon.Inthe
initializationsectionacoupleoflibrariesareincluded,andacoupleofvariablesaredeclared.Theninthesetup
section,awindowiscreated,andtheopencvinstanceisconfigured.BasicallyaftertheinstanceoftheOpenCV
classiscreated,theclassisconfiguredtocaptureavideothatsamewidthandheightofourwindow,andthe
detectionshapeissettodetecttheimagedefinedbytheCASCADE_FRONTALFACE_ALTfile.(Tryoutsomeof
https://www.sparkfun.com/tutorials/304
9/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
thedifferenthaarcascadexmlfilestoseewhattheydo!JustcopytheXMLfileslikeyoudidbefore,andrename
thefileinthislineofthesketch).AfterconfiguringtheopenCVinstance,someinstructionsareprintedtothe
useronhowtomanipulatethebrightnessandcontrast.
voiddraw(){
//grabanewframe
//andconverttogray
opencv.read();
opencv.convert(GRAY);
opencv.contrast(contrast_value);
opencv.brightness(brightness_value);
//proceeddetection
Rectangle[]faces=opencv.detect(1.2,2,OpenCV.HAAR_DO_CANNY_PRUNING,40,40);
//displaytheimage
image(opencv.image(),0,0);
//drawfacearea(s)
noFill();
stroke(255,0,0);
for(inti=0;ilength;i++){
rect(faces[i].x,faces[i].y,faces[i].width,faces[i].height
}
}
Thispartofthesketchissurprisinglyshort!TheOpenCVinstancereadsaframefromtheWebcam,convertsit
tograyscale,thensetsthecontrastandbrightness.Theonlyweirdpartofthesketchistheopencv.detect(...)
stuff,I'mnotsureexactlywhathappensthere.Buttheresultisthatthereisanarrayofrectangleswhich
representthecoordinatesofthedetectedfaces,whichisexactlywhatwewerehopingfor!Aftersavingthe
detectionalgorithm,theimagecapturedfromthewebcamisdisplayedinthewindow.Finally,there'saloopthat
drawsarectanglearoundeachofthe'faces'thatweredetectedusingthecoordinatesinthefacesarray.This
lastpartwasthekeyinfiguringouthowtocontrolaservowithdatafromtheOpenCVlibrary.Sinceweare
giventhexandycoordinatesofthefaces,wecanusethesecoordinatestodirecttheservo!Let'smoveonto
thefinalsketch,whereweusedatafromtheOpenCValgorithmtomovethepan/tiltcameraandkeepafacein
thecenterofthepicture.
FinalProcessingSketch:Pan/TiltFaceTracking
Wenowhavetwosketchesthatlookliketheycanimplementafacetrackingapplication.TheArduinosketchwill
allowustosetthepan/tiltanglesofthewebcambysendingserialstringsfromacomputertotheArduino,and
theProcessingsketchwillgiveusxandycoordinatesofafaceinaframe.Theplanistotryandkeepthexand
ycoordinatesofthefaceinthecenterareaofthescreenbymovingthewebcamleft/rightandup/downbased
onthecurrentxandycoordinates.Inordertogetthisworking,though,westillneedtochangetheprocessing
sketchsothatitcansendserialcommandstotheArduino.Ifyouhaven'tdownloadedthePanTiltFaceTracking
Processingsketch,dosonowandextractittoyourProcessingsketchbook.Onceyou'rereadyopenthesketch
inProcessing.Ifyouwanttoskipthedescriptionandgetstraighttothedemonstrationmakesureawebcamis
pluggedintothecomputerandthattheArduinoispluggedintothecomputerwithaUSBcable,andalsoprovide
anexternal9VDCpowersupplytotheArduino.Oncethehardwareissetupjustpressrun.
https://www.sparkfun.com/tutorials/304
10/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
ThereareahandfulofchangesthatneedtobemadetocontroltheArduinosketchfromtheProcessingsketch.
Mostly,though,allweneedtodoisaddawaytotalkusingtheserialport,andalsoawaytokeeptrackofthe
currentpositionofthepan/tiltservos.
//contrast/brightnessvalues
intcontrast_value=0;
intbrightness_value=0;
Serialport;//Theserialport
//Variablesforkeepingtrackofthecurrentservopositions.
charservoTiltPosition=90;
charservoPanPosition=90;
//Thepan/tiltservoidsfortheArduinoserialcommandinterface.
chartiltChannel=0;
charpanChannel=1;
//Thesevariablesholdthexandylocationforthemiddleofthedetectedface.
intmidFaceY=0;
intmidFaceX=0;
//Thevariablescorrespondtothemiddleofthescreen,andwillbecomparedtothemidFace
intmidScreenY=(height/2);
intmidScreenX=(width/2);
intmidScreenWindow=10;//Thisistheacceptable'error'forthecenterofthescreen.
//Thedegreeofchangethatwillbeappliedtotheservoeachtimeweupdatetheposition.
Thesetupandinitializationsectionofthesketchlookalotlonger,butit'smostlycommentsthatwereaddedto
makereadingthesketchabiteasier.Somevariableswereaddedfortheserialport,tokeeptrackofthepan/tilt
servopositions,andtohelpanalyzethefacecoordinatesvs.themiddleofthescreen.Inthesetupsectionof
thesketchsomenewcodewasaddedtocreateaserialconnectionandtoinitializethepositionofthepan/tilt
servos.Ifyou'regettinganerrorthathighlightstheserialconnectionlineofthesketch,theselectedserialport
probablyneedstobechanged.Theserialportnumberislocatedinsiderthe[]brackets,inthiscasethesketch
isselectingthefirstportinthelistwith[0].Evenifthesketchisshowinganerror,youcanfindtheproperportin
thesketchoutput.Here'swhattheoutputlookslike:
SinceIwantthesketchtoconnecttoCOM3,Iput0intothe[]bracketssincethat'stheitemnumberoftheserial
portlist.Afterconnectingtotheserialportanddisplayingtheinstructionstotheuser,theinitialservopositions
aresenttotheArduinosketchusingtheport.write()commands.
https://www.sparkfun.com/tutorials/304
11/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
voiddraw(){
//grabanewframe
//andconverttogray
opencv.read();
opencv.convert(GRAY);
opencv.contrast(contrast_value);
opencv.brightness(brightness_value);
//proceeddetection
Rectangle[]faces=opencv.detect(1.2,2,OpenCV.HAAR_DO_CANNY_PRUNING,40,40);
//displaytheimage
image(opencv.image(),0,0);
//drawfacearea(s)
noFill();
stroke(255,0,0);
for(inti=0;ilength;i++){
rect(faces[i].x,faces[i].y,faces[i].width,faces[i].height);
}
Therearequiteafewadditionstothedraw()codefromtheinitialface_detectionsketch.Allofthechangesare
aftertherectangleisdrawnaroundthefacearea.Firstwefindoutifthereareanyobjectsthatwereplacedin
thefacesarraywiththefaces.lengthargument.Iftherearesomefacesthenwemakesomecalculationsto
determinethecoordinatesofthecenteroftheface.Noticethattheonlyfacecoordinatesthatareusedarethe
coordinatesinthefirstarrayposition.Thismeansthatifthereismorethanonefaceintheframe,thesketchwill
onlytrackthefirstfaceitsees.Thismightseemperfect,buttheOpenCVlibrarydoesn'talwaysputthesame
faceinthesamearraylocationsothesketchwillonlyworkproperlyifthereisonlyonefaceintheframe.
Afterfindingoutwherethemiddleofthefaceis,thispositioniscomparedtothecenterofthescreen.Ifthe
centerofthefaceisabovethecenterofthescreen,thetiltpositionvariableischangedtoraisethewebcam.
Thechangeinthewebcamangleissmall,butitstilltriestogetthesubjectsfaceclosertothecenterofthe
screen.Thesamegeneralprincipleisappliedifthefaceisbelowthecenterofthescreen,ortotheleftorright
ofthecenter.
Andthat'sit!Nowyouhaveawebcamthatwillfollowyouasyoumovearoundtheroom.Ibuiltalittlemountfor
mineusingwoodblocksandsomeclampssothatIcouldsetitonaflatsurface.FortestingIjustheldthepan
servoinmyhandwhileImovedmyheadaround.Kindacreepy,butIthinkit'sfun.Ifyouwanttoplayaround
withit,startbychangingthestepSizeandmidScreenWindowvariablestogetafeelforhowthesevaluesaffect
thedevicesbehavior.Ifyoucanfigureouthowtohavethewebcamtrackaspecificpersonintheroomwhile
therearemultiplepeopleintheframe,pleaseletusknowandpostinthecomments.Havefun!
NOTE:solutiontotherectangleproblemmakesureimportjava.awt.Rectangleisthesecondlineinyour
processingsketch:facedetection
Comments96comments
Loginorregistertopostcomments.
Member#391369 / about4yearsago / 2
https://www.sparkfun.com/tutorials/304
12/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Thissoundslikeagreatproject.Ifollowedthestepsgotallthecomponents,butwhenIruntheface_detection
codeinprocessing2.0b7andtrieditwith1.51error!!!!,Thepackagehypermediadoesnotexist.Youmight
bemissingalibrary.Ilocatedthehypermediafolderandtriedplacingitinlibrariesfolder,thenintheface_
detectionfolder,theninafolderthatIcreatedcalleddatainface_detectionfolder,butnoluck.:(WhatcanI
do,IwanttostartthisprojectandIhavebeenstuckforhours.ThoughtIpostthisonhereforsuggestionsfrom
Sparkfunanditsmembers.
Malik / about4yearsago / 1
Seemslikesparkfunpeoplearenotabouttohelpusaboutthistroublesomethingy
maaaan,cantblamethemsincethistutorialisgettingolderandolderbytimeandtheyshallbebusy..BUT
STILLHELPPLZZZZZZZ!!=)
MikeGrusin / about4yearsago / 2
Wereverysorryaboutthat.TheengineerwhodidthisprojectisnolongeratSparkFun,andnoneof
usherehavedoneafacetrackingprojectsowereinthesameboatyouare.(Ivebeenthinkingabout
doingoneontheRaspberryPi,buttheresalotofotherthingsthatneedtogetdonefirst.)AllIcan
sayisbestofluck,andifyougetitworkingpleaseposthowyoudidittohelpeveryoneelsewhos
havingtrouble(includingus).Thanksforyourunderstanding!
IdidthisontheRaspberryPiaboutfivemonthsago.http://www.instructables.com/id/PanTilt
Grintor / about3yearsago / 1
facetrackingwiththeraspberrypi/Whenyouusearaspberrypi,youdontneedthearduinothe
controltheservos.YoucancontrolthemdirectlywiththePi.
Malik / about4yearsago* / 1
ifanythereisanyneedforsnapshotsdemonstration,justcomment).
WhatOSandProcessingVersionareyouusing?Ivebeentryingtogetthisthingworking
Cowattack / about3yearsago / 1
anditjustwonttake.
Malik / about3yearsago / 1
sorryforthelateresponce,wasbusystudying^^
Windows764bit,Processing2.0b3
(thatstheversionIusedwhenIdidthisproject,however,Ithinkanynewer(ormaybe
evenolder)wouldwork.FortheOperatingsystem,IwilltrytomakeitworkonUbuntu
ifIwouldhavethetime^^.
Ohnoworries,Imanagedtogettheprogramrunningthroughsometrialanderror
Cowattack / about3yearsago / 1
onthesamesetupthatyouseemtohaveused.Imkindofcuriousifitseasierto
operatethroughlinuxthough.Thanksfortheresponseatanyrate!
https://www.sparkfun.com/tutorials/304
13/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Actually,justincasesomeoneelsereadsthis.Ifyouscrolldowntothelast
Cowattack / about3yearsago / 1
discussiononthispagetheressomelinkstopastebinImade.Ifyoufollow
thoselinks,therestwoworkingpiecesofcodethatyoucanusetotestyour
system(IknowtheyworkonWindows7(64bit),withProcessing2.0b(32bit
version)).
Malik / about4yearsago / 1
Alright,hypermediaproblemISNOWHISTORY
Forthosewhohavesimilarproblem,allwhatyouhavetodoistoputopenCVlibraryNOTin
processing(theProgram)libraryfolder,BUTINyourlibraryfolderthatislocatedinsideyour
sketchBookfolder.
yousee,whenyouchoosefromprefrencesyoursketchBooklocationand
restartedprocessingafterthat,processingwillcreatethreefolderinsideyour
sketchBooknewlocation:library,modesandtools.Soyougonnainsertthe
opencvfoldercontainingthelibrary,examplesandeverythinginthere.
ThisfortheHypermediatrouble.
afterthat,anewerrorhasencounteredmecantparseerrortext,unexpectedbracket..
(asiremember)however,thisproblemissimpletosolve,itsjustaboutthenameofyour
sketchBooklocationifitdoescontainanycharacterthatprocessingdidntlike(minewas
Arduino[ProcessingsoIhadtochangeittoArduinoProcessing)sotrytoavoidusingspecial
charactersinyourFOLDERSnames(theparentdirectoriestoyourskecthBook.
Malik / about4yearsago / 1
yeah,Iamworkingonit^^
(ImputtinginmythatthereasonbehindthiscouldbetheversionofProcessing,sinceallthe
poststhathasthesameproblemareafteralmostthesameamountoftimeofpostingthis
project).
Malik / about4yearsago / 1
AFriendofMinehastoldmethatitmaybehastodowithDLL(Dynamiclinklibrary)for
processingwhenyouworkinwindows,inaddition,hesaiedthatImightnotfacesucha
problemifIworkedinUbuntu.
soIwishifsomeonewilltrythisformesinceImbusystudyingthesedays.
Forpeoplehavingthehypermediaproblem.TrychangingPreferences>SketchbookLocationItshouldshowa
Member#123295 / about4yearsago / 2
pathwith..\Documents...ChangeDocumentstoMyDocuments.Thatfixeditforme.
Spentcountlesshourstryingtogetthisstupidthingtoworkandkeepgettinganswerthatthereisno
Member#356153 / about4yearsago / 2
hypermediaevenwhenthereis.Ifanyonegetsitrightthefirsttimeyoudonotknowhowluckyyouare.
Member#356153 / about4yearsago / 2
https://www.sparkfun.com/tutorials/304
14/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
IthinkIammissingsomething.Sometimeswhenyoudosomethingenoughtimesyoucannotseewhatit
is.Maybesomeonecanhelpme.IruntheprogramandIgetaNolibraryfoundforhypermedia.video
Idownloadedtheentireprogramandcannotseemtogetthewebcamtowork.Iamusingamac.
hello,Thisisperfect,butherethecommunicationbetweenthearduinoandopenCVonpcisdoneviaserial
Member#797537 / about7monthsago / 1
communication.ButiintegratedtheOpenCVintheSDcardonarduino,soiwanttoknowhowtoletthem
communicateonthesamedevice?ineedavirtuallinkiguess,buthow?Cansomeonehelpmeplease
Thanks
hello,Thisisperfect,butherethecommunicationbetweenthearduinoandopenCVonpcisdoneviaserial
Member#797537 / about7monthsago / 1
communication.Butiintegratedthesoftware(OpenCV)intheSDcardonarduino,soiwanttoknowhowtolet
themcommunicateonthesamedevice?ineedavirtuallinkiguess,buthow?Sothatthearduinosketcheswill
reactontheoutputoftheOpenCVcodeandnotwhenadataiscomingontheserialport.Cansomeonehelp
mepleaseThanks
IvecreatedanuptodatePythonversionofthecodeifanyoneisinterested:
Member#670745 / about9monthsago / 1
http://mmorfe.blogspot.com/2016/02/buildingrobot.html
Hello,thanksforthetutorial,IamEduardoBrazil.ButIcouldnotdownloadtheOpenCVProcessingexamples,
Member#774007 / about9monthsago / 1
themessagewas:NotFoundHasanotherlinkfile?Thanksandahug
hi,canidothesamethingwitharduinoAtmega168??
Member#755262 / about11monthsago / 1
doesanyonehasalinktothishypermedia.video.fileorlibrary?ihavenoissueswiththiscodesoicanshare
Member#651983 / about11monthsago / 1
mineswiththecommunityijusthappentohavedeletedmyhypermediafolderbyaccident(thanksguys
ThisisprettyeasytoimplementwiththeIOIOboard,Android,OpenCV,andacoupleofHitec422servos,as
Member#396428 / about3yearsago / 1
shownhere:
http://youtu.be/IpGD7KBM4zA
hi,
Member#465736 / about3yearsago / 1
IhaveasmallproblemwhenIcompilenothingappears(OpenCVcouldnotdefinesourcedimensions)canyou
helpme??
https://www.sparkfun.com/tutorials/304
15/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
DevelopedtheprojectequaltothetutorialmorewhenIstartopencvfindsmyfacebuttolocatethecamera
Member#442013 / about3yearsago / 1
movescomingoutofmyface,couldyouhelpme?
GreetingsEveryone!
Member#70246 / about3yearsago / 1
Ijusthadaquickquestionandhopethatcanpossiblybeaddressed.Iamcurrentlyinterestedonworkingon
thisFaceTrackingPanTiltServoProject,however,originallyIhaveacquiredaFPVcamerawithzoom
capabilitiesthatisactuallyusedforRCaircrafts..DoesanyknowifanFPVcamerawouldworkonthisvideo
processing?AndalsoiftheUNOArduinocouldpossiblycontrolthezoomingportion?ThanksforanyFeedback
hasIwouldgreatlyappreciated.
Thankyou!!!
IvegotthewholethingworkingonWindows7,butittookalotoffiddling.Imgoingtoworkoutthedetailsand
Cowattack / about3yearsago / 1
thenmakeupatutorial.FeelfreetopostquestionsandIlltrytoanswerthem.
Iamgettinganerrorafterchangingimportjava.awt.*
Member#422590 / about3yearsago* / 1
!!!requiredlibrarynotfound:C:\MyDocuments\Processing\libraries\OpenCV\library\OpenCV.dll:Cant
loadIA32bit.dllonaAMD64bitplatformVerifythatthejava.library.pathpropertyiscorrectlysetandthe
\path\to\OpenCV\binexistsinyoursystemPATH
DoesthismeanIcannotcompletethisprojectonaWindown764bitplatform?=(
Sorry,alittleslowresponding.Imnotfamiliarwiththaterror,butIamusingaWindows764bit
Cowattack / about3yearsago / 1
systemsothatshouldntbetheissue.Thatbeingsaid,Imusingthe32bitversionofProcessing2.0b,
soifyouvedownloadedthe64bitversiontryswitchingitout.Also,IfoundthatOpenCVdidntactually
createtheproperSystemPathwhenyoufollowthedirectionsandclickthelittleboxduringinstall.
Youllhavetomakesurebygoingtothesystemvariables,findingtheentrythatstartswithPath=,
andaddingthevalueC:\OpenCV\bin\orC:\ProgramFiles\OpenCV\bin\dependingonyourinstall
location.IusedRapidEnvironmentEditor7.2foreditingthesystemvariables(Itsfree).Hopethat
helps!
AftergivinguponmydesktopIgotpastthisproblembyusingmyoldlaptop.Desktopwasacustom
Member#422590 / about3yearsago / 0
build.LaptopisrunningonW7andusingthex32.
Mynewproblemisafteraddingthemodifiedcodeforcontrollingthepositionintheprocessingsketch,
itdoesntlikefaces.Cannotfindfaces.Iwoulddeclareitasanarrayatthebeginningofthe
programbutIdontknowhowtodothat.
Cowattack / about3yearsago* / 1
https://www.sparkfun.com/tutorials/304
16/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
IsittheRectangle[]facesthing?Youmightneedtodeclareimportjava.awt.*Thatshouldget
thejavaRectangleworking.Although,ifyougeteverythingrunning,Idlovetoknowifyour
programcrashesoutforrunningoutofmemory.Ifso,youhaveamemoryleakwithimage().I
gotpastthatbywritingtoeachpixelindividually.
Iincludedtheimportjava.awt.*anditdoesntcomplainaboutthespecificRectangle[]
Member#422590 / about3yearsago / 1
functionbutincallingitlatertodefinethescreenpositionasinif(faces.lenght>0).Illletyou
knowaboutthememoryissueIFIcangetitfunctional.
TrymakingfacesglobalbywritingRectangle[]facesaboveyourvoidsetup().Then
Cowattack / about3yearsago / 1
changetheoriginalbittojustfaces=opencv.detect(1.2,2,
OpenCV.HAAR_DO_CANNY_PRUNING,40,40).
ItseemstobeokaywithfacesnowbutIgetaNullPointerException.Isthere
Member#422590 / about3yearsago* / 1
anywayIcouldsharemycodewithyouasIdontthinkIhavetheknowledgeI
needtobeagoodtroubleshootie?IhaventworkedwithjavabeforesoIm
stumblingthroughasIgo.
AlsoIwasgettingtheblackimagescreenbeforeImodifiedtheoriginalcode.I
haveseenafewpeoplereferringtoworkaroundsbutIwilltryasimplercamera,
currentlyusingaMicrosoftHD720.
Seeifyoucanfollowthislink.Shouldshowyouabasic,functionalcode.This
Cowattack / about3yearsago* / 1
codedoesmemoryleakforme,butitllmakesureeverythingworksforyou.
http://pastebin.com/vhVRFZC1
http://pastebin.com/B2U33H43iswhatIhavesofar.Illtryyourexample
Member#422590 / about3yearsago* / 1
andletyouknow.
Okaysoyourcodeworkedwiththememoryleakyoudescribed.Buthey
thatwasarealencouragementtoknowmycomputerisactuallycapable
ofsuchthings!=)
Hereyougo,thislinkwillshowyouthecodethatdisplayspixelby
Cowattack / about3yearsago / 1
pixel.Italsoletsyoumovearoundtheimageinthedisplaywindow
bychangingthexandystartvaluesabovevoidsetup().Try
combiningthiswithyourArduinostuff.
http://pastebin.com/xzFXGxNV
https://www.sparkfun.com/tutorials/304
17/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Itseemsthatmylines:
Member#422590 / about3yearsago* / 1
midFaceY=faces[0].y+(faces[0].height/2)midFaceX=
faces[0].x+(faces[0].width/2)
onlyreturnavalueofzero.Sothevalueoffaces[0].xandthe
width/heightexpressioniszeroaswell..whichIdont
understandbecauseIamseeingtherectanglearoundmyface
whichthensimplycausesmyservostoincrementtothe
maximumwhileafaceispresent..
http://pastebin.com/index/9555Am0h
Woops,missedthatreply.Ifyourejustconcernedabout
Cowattack / about3yearsago* / 1
trackingasingleface,tryjustchangingyourfaces[0]to
faces[i].
Member#422590 / about3yearsago* /
HA!ThezerovalueIwasgettingwasnotmidFaceX
butwasmidScreenXsoitwouldalwaysoccurbeing
thattheheightandwidthvariableswerenotreturning
values.IsimplychangedthevariablemidScreen+
midWindowtothepixelvalueofmycenterbeing
640x320+/10tobeing330and190or310and170!
Itworksnowthoughtitsabitchoppy.Iwillchange
theupdateincrementtobetheangulardisplacement
ofthecenterthenitshouldbeabletocenterin1
iteration!=)Thankssomuchforyourhelp
Cowattack!Yourock!http://pastebin.com/j3dMCkYa
Awesome!Atleastthatmeansthesystemissetupproperly.Illpost
Cowattack / about3yearsago / 1
alinkfortheworkaroundforthatleakinjustalittlebit.
Actually,Iwasthinkingofsendingyoumypieceofcodesomehow.Idont
Cowattack / about3yearsago / 1
knowiftheresawaytodoaprivatemessageonthissite,butmaybeIcan
findsomewheretopostit.Ihaventhadtimetodoatutorialyet.
Inregardstoyoursecondblackscreenthing,Iwasgettingthattoo.The
problemseemstobethatOpenCVsCapturefunctiondoesntactivatethe
camera.TogetthattoworkIhadtocaptureusingprocessing.video.*and
thenusethecopyfunctiontopasstheimagetoOpenCV.Thatmaybethe
workaroundyoureferredto.
https://www.sparkfun.com/tutorials/304
18/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Hasanybodytriedthisoutside?
Member#399152 / about3yearsago / 1
Reallywantto,mighthavetoadjustthethresholdssoitsnottoobright
Cowattack / about3yearsago* / 1
spentlotsoftimecopyingfilestofolders..Itrieditwith1.5.1Pand20b8Icantgetthecascadefrontalfaceto
Jonnykill / about4yearsago / 1
finditself.IputitintherightfolderAnyhelpifwithyoucanThanks..
ImusingProcessing2.0b,andIusedtheAddFilefeatureandjustlookedupthelocation.Shouldwork
Cowattack / about3yearsago* / 1
afteryoudothis.Edit:YouneedtolocateitatC://OpenCV/data/haarcascades.Thewilldependon
whereyouloadedit,mostlikelydirectlyunderC:/orC:/ProgramFiles/
whenirunthesketch,itsays:Cannotfindanythindnamedilength.willyouhelpmeplease
Member#419602 / about4yearsago / 1
Ivesolvedtheproblem.Ithastobei<faces.length
Member#419602 / about4yearsago* / 1
Itseemslikeyouaregettingthistowork?Iamnewtosparkfunandthisismyfirstprojectwith
Member#422590 / about3yearsago / 1
openCV.Icangetpastthecannotfindhypermedia.videobutthenIdontseemtohavethelibraryfor
Rectangle[]andcannotfinditanywhereonline.Anyideas?
onthetopofyourprocessingcodetypeimportjava.awt.*
Cowattack / about3yearsago / 1
HowwellwouldthisworkwiththenewpcDuino?Asingleboardsetupwouldbegreat!
Shpoople / about4yearsago / 1
Imreallyonlyinterestedinmovingtheservosviaaserialcommand.AfteruploadingtheSerialServoControl
Grasshorse / about4yearsago / 1
sketchtotheArduinoIshouldbeabletoopenupaSerialMonitorandtypevaluesinright?Like
0,1800,0etc.
WhatamIdoingwrong?
Iappeartohavefallendownatthefirsthurdle!!gettingerrormessagecannotfindaclassortype'Rectangle
Member#395509 / about4yearsago / 1
thisappearstobeafileidonthave??(importjava.awt.Rectangle??)doesanyonehaveanypointers??Many
thanks!
https://www.sparkfun.com/tutorials/304
19/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Imhavingthisissueaswell!
Member#213675 / about4yearsago / 1
Ivefoundthatimportjava.awt.Rectangledoesntwork,andyoujusthavetouseimportjava.awt.*
Cowattack / about3yearsago / 1
Imgettingthesameresults.Haveyoufoundasolutionyet?Imaboutreadytojustchuckthiswhole
Member#395725 / about4yearsago / 1
project.
Hey,folks.Iwouldkindlyappreciatesomehelp,hereIvedoneeverythingwritteninthistutorial,butwhenI
Member#319806 / about4yearsago / 1
compileandrunprocessingsoftware,Ionlygetablankscreen,showingnoimageeventhoughthecameralight
ison.Doesanyonehaveaclueofwhatmightbecausingthis?
Thanksinadvance!
HaveyoufiguredoutthisproblemyetIamhavingthesameproblem
Member#359061 / about4yearsago / 2
maybethiscanhelpyou..http://n0m1.com/2012/04/19/facedetectionandrcservos/
Member#385227 / about4yearsago / 1
Oh,takeallthecodefromhere:https://github.com/cranklin/FaceTracking
Member#319806 / about4yearsago / 1
Robot/blob/master/sentrygun.py
Thereyoucanfindpythoncodeandthearduinotoo.Onlysmallchangesneedtobedoneinthecode,
butIamsureyouwillfigurethatoutasIdid!
Goodluck!
Didnotgettosolveit.Meanwhile,ItriedusingPythonandvoil!
Member#319806 / about4yearsago / 1
Haveyoutriedclickingandholdingthemousebuttoninthewindowandmovingthemousetochange
QuickQuestion / about4yearsago / 1
contrastandbrightness?
//printusageprintln(DragmouseonXaxisinsidethissketchwindowtochangecontrast)println(Drag
mouseonYaxisinsidethissketchwindowtochangebrightness)
weretheseinitializedproperly?
intcontrast_value=0intbrightness_value=0
Member#319112 / about5yearsago / 1
https://www.sparkfun.com/tutorials/304
20/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
ImwonderingwhythelinktotheOpenCVlibrarydoesntwork?
Hello
TherequestedURL/shared/processing/opencv/download/opencv_01.zipwasnotfoundonthisserver.
Isthereanalternative?
Thankyou
MikeGrusin / about5yearsago / 1
Theyapparentlymovedit,justbackuptheURLuntilyoufindapagethatworks:
http://ubaa.net/shared/processing/opencv/.
gettingablackscreenalso.everythingseemstobeworking,buttheprocessorprogramjustgivesablank
Seraphim / about5yearsago* / 1
screenwhentheprogramisrun.
Anyhelporsuggestions?
Thanksinadvance.
Didyoueverfigurethisout?
Member#359061 / about4yearsago / 1
Pleasehelp.IamgettingablankscreenwithgreyorblackcolorasImovethemouseinx&ydirections.No
Member#297139 / about5yearsago* / 1
picture.
Thisdidntworkforme
Kinshi / about5yearsago / 1
Processingwouldusethelibrarytodetectfacesandtrackthemok,butthedatasenttoarduinowasntdriving
theservomotors.theboardwasreceivinginformation,butmaybeitwassentinasciiandarduinodidntlikeit
dunno,butIaddedprintln((int)servoTiltPosition)andpanposition,toseewhatsgoingon,andnothingmoves.
Didyoufindasolutionforthis?IhavethesameproblemArduinoisreceivingdatabuttheservosarent
mrsqueakywheel / about4yearsago / 1
moving
Istartedthisprojectlastweekandranintothesameproblem,howeveraftercountlesshoursof
Member#199000 / about3yearsago / 1
debuggingandbrainpower,Ifinallyresolvedtheproblem.Ifyouarestillinterestedintheprojectand
ranintothesameproblemlmk.
Blankscreen
Member#297139 / about5yearsago* / 1
https://www.sparkfun.com/tutorials/304
21/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
yougottacopythelibrarytodocuments>processing>library>
Kinshi / about5yearsago / 1
yes.
Member#297139 / about5yearsago* / 1
WhenIrunthebasicProcessingexample,insteadofseeingmyvideointheboxitsjustblackWhatiscausing
JordanTallent / about5yearsago / 1
this?
Thisisanawesometutorial.ExactlywhatIvebeenlookingfor.
UNTEngineer / about5yearsago / 1
ButIllbeworkingwithVS2010andnotProcessing,soaftermessingwithVS2010andsearchingaround,I
madeatutorialofsettingupOpenCV2.3.1onWindows7x64usingVisualStudio2010(orExpress).Checkit
outathttp://tae09.blogspot.com.
itseemsasthoughinthedemonstrationvideothebotmovesverysmoothly.Minemovesinrealsteps
Member#272020 / about5yearsago / 1
Anyideawhymineisntsosmooth?Howitcanmove/followsmoother?
Otherwiseworksgreat!
Iwanttotakemycomputeroutoftheequation
Member#272020 / about5yearsago / 1
Cananarduinomegahandletheprocessingsketch?
no,processingneedstorunonacomputer.
RobertC. / about5yearsago / 1
Whataboutmybotnotmovingsmoothly,takesacouplesecondsforittopanacrosstomyface.
Member#272020 / about5yearsago / 1
Thevideoseemsveryquick.Couldthisbebecauseofmyservos?
Member#264114 / about5yearsago* / 1
Gotthisworkingyesterday,areallycoolproject.Onlytwoproblemsthough,Ihopesomebodyherecanhelpme
Member#264114 / about5yearsago / 1
withthose:Thereactionoftheservosisquiteslow(asIthinksomeotherpeoplealsomentioned,somaybe
thatsjustthewayitis)Theservosseemtoovershootthemidpoint.Thus,iftheservomovesthecamerato
theright,itovershootsitsmark,thencorrectstotheleft,thentotherightetc.Ivetriedmakingthe
https://www.sparkfun.com/tutorials/304
22/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
midscreenwindowlarger,butthatdoesnthelp.IvealsotriedchangingintstepSize=1tofloatstepSize=
0.5,butwhenIdothattheservoswillonlyturninonedirection(downandleft)Idontseethishappeninginthe
accompanyingvideos,soIhopethiscanbesolved.
isgivinginmytwomistakessomeonecanhelp,,,alreadyaddedtothefilefolderandnothing
DiCreuza / about5yearsago / 1
Thehaarclassifiercascadefilehaarcascade_frontalface_alt.xmlcannotbefoundinfolders,youmustspecify
thefullpathinstead.
WARNING:RXTXVersionmismatch
Jarversion=RXTX2.2pre1
nativelibVersion=RXTX2.2pre2
http://forum.processing.org/topic/rxtxversionmismatchIfoundafixforthathere^
Kinshi / about5yearsago / 1
Ah,gotit!Justhadtochangeagreaterthanforalessthanandviceversa.
delgesu / about5yearsago / 1
Imalsoonlygettingmyfacepushedtothesideofthescreenuntilitgoesoutofrangeofthefacerecognition.
delgesu / about5yearsago / 1
Ivetriedyoonkasrevisedcodeanditdoesthesamething.SurelyImnotTHATbadlooking!Cananyonegive
meanyadviceonwhattochangetocorrectthisplease.Note:IaminAustraliawherewatergoesdowntheplug
holetheotherway.Maybethatstheproblem.
ThereisagoodsoftwareeyetrackerfortheMac,Ithastotrackthefacetotracktheeye,alsoitsopensource.
christ0ph / about5yearsago* / 1
Ithinktemptisitsname.Caveat,IamstillonLeopard,OS10.5
ThisdeviceremindsmeofagreatsceneintheMUSTSEE1980smovieBrazilbyTerryGilliam
Isitmeortheservoshavenotbeenincludedinthehardwarelist?:)
Wylly / about5yearsago / 1
Nicetutorial!!
IvejustpostedablogarticleabouthowIgotthistoworkwithPythoninsteadofusingProcessing.Ivealsogot
codekoala / about5yearsago / 1
minesetuptomovemywebcamandstillletmechatwithSkypeorwhatever.MysetupisonLinux,butyou
mightcomeupwithawaytodoitinWindows/OSX/whatever!
http://www.codekoala.com/blog/2011/arduinopoweredwebcammount/
Juhnke / about5yearsago* / 1
git://gist.github.com/1202013.git
Geezimpossibletosharecode!
brennen / about5yearsago / 1
https://www.sparkfun.com/tutorials/304
23/24
10/16/2016
FaceTrackingwithaPan/TiltServoBracketSparkFunElectronics
Markdownworkshere,soyoucanstickfourspacesinfrontofcode,likeso
//sayhello
printHelloworld.
butyeah,maybeweshouldworkupawaytoembedgists.
Juhnke / about5yearsago* / 1
Codeworkswithtweaksbelow.InitiallythecamerawouldhuntAWAYfrommyface.Imtryingnottotakethat
personally.)
Afterpolaritytweaksitseemstoworkjustdandy!
OpenCVisslow.~200MS/cycleslow.
dearyoonka,bypolisrtytweeksdidyoumeanreversingthe<&>intheconditionalstatementsfor
Member#307526 / about4yearsago / 0
midFaceY<andmidFaceY>intheprocessingcode?thanks,aram
Juhnke / about5yearsago / 1
Dude!Isthatsweatonyourshirtinthevideoatthetop?Yikes!!!
DEVELOPERS!DEVELOPERS!DEVELOPERS!DEVELOPERS!
pburgess / about5yearsago / 1
Juhnke / about5yearsago / 1
NoJoyonMacOSXLion.Evenafterrestart.ProcessinggivesInvalidmemoryaccessoflocation0xb9e33140
eip=0xb9e33140asanerrormessage.IdidgetittorunonSnowLeopardwithoutahitch.Awesomejobguys!
Whatisthebehaviouriftherearemultiplefacesinview?
RichardK_Solar / about5yearsago* / 1
edit:nevermindijustreadthetutorialproperly.lolanyways,itwouldbenicetodothatonembedded
electronicswithouttheneedofacomputer.Allonboardabot.
https://www.sparkfun.com/tutorials/304
24/24