[SDL] SDL and OpenCV
Alex Barry
alex.barry at gmail.com
Thu Jul 22 16:44:33 PDT 2010
That would probably work - my best suggestion is giving it a try, and if
that works, awesome, and if not, the filter might have to be put inside the
lens-system so it's closer to the camera sensor on the circuit board.
Let me know if that works.
-Alex
On Thu, Jul 22, 2010 at 6:46 PM, Donny Viszneki <donny.viszneki at gmail.com>wrote:
> I have previously confirmed that my camera receives infrared light. It
> should be as simple then as taping an IR-pass filter to filter out
> visible light?
>
> On Thu, Jul 22, 2010 at 6:14 PM, Alex Barry <alex.barry at gmail.com> wrote:
> > I used a hacked PS3Eye Camera - check the README file for materials -
> I'll
> > write a tutorial for building, but you could always just follow the
> > instructions from EyeWriter: http://fffff.at/eyewriter/The-EyeWriter.pdf
> >
> > To have the PS3Eye Camera (remove IR filter, and add an IR bypass):
> > http://nuigroup.com/forums/viewthread/4189/
> > ^ This probably also works for other cameras, but for the quality and
> price
> > of a PS3Eye, you're better off using a PS3Eye (about $40CDN or $35US),
> where
> > similar specs on "real" webcams cost about $60-$70...but that's your
> call.
> >
> > If you already have a webcam, google to see if it has an ir filter - if
> it
> > does, it should be fairly simple to remove it and put in an ir bypass
> (check
> > out the video on hacking the PS3Eye Camera for what to use for an ir
> bypass)
> > There is also a website that sells pre-hacked PS3Eye Cameras for this
> very
> > purpose, if you're so inclined : http://peauproductions.com/
> >
> > I hope that helps,
> > -Alex
> >
> > On Thu, Jul 22, 2010 at 2:04 PM, Donny Viszneki <
> donny.viszneki at gmail.com>
> > wrote:
> >>
> >> What kind of hardware is needed to develop this software? Google just
> >> showed me an add for a 500 FPS camera used for eye-tracking
> >> applications, and well, that got me wondering if my Microsoft webcam
> >> would do the trick.
> >>
> >> On Thu, Jul 22, 2010 at 1:35 PM, Alex Barry <alex.barry at gmail.com>
> wrote:
> >> > heh - it's on the todo list :)
> >> >
> >> > On Thu, Jul 22, 2010 at 10:37 AM, Donny Viszneki
> >> > <donny.viszneki at gmail.com>
> >> > wrote:
> >> >>
> >> >> Is there not a revision control repository somewhere? I recommend
> >> >> against Subversion or CVS if you have not yet committed (lol) to one.
> >> >>
> >> >> On Thu, Jul 22, 2010 at 1:14 AM, Alex Barry <alex.barry at gmail.com>
> >> >> wrote:
> >> >> > I just put up the first download:
> >> >> > http://sites.google.com/site/alexbarry/projects/eyetracker
> >> >> > The code is fairly messy and not well documented.
> >> >> > I am using my own custom UI system - feel free to steal it to use
> in
> >> >> > your
> >> >> > own projects :)
> >> >> >
> >> >> > Take care,
> >> >> > -Alex
> >> >> >
> >> >> > On Wed, Jul 21, 2010 at 9:42 PM, Sam Lantinga <slouken at libsdl.org>
> >> >> > wrote:
> >> >> >>
> >> >> >> Nice! :)
> >> >> >>
> >> >> >> On Tue, Jul 20, 2010 at 9:29 AM, Alex Barry <alex.barry at gmail.com
> >
> >> >> >> wrote:
> >> >> >> > My website just went down, so I remembered my google pages
> >> >> >> > website,
> >> >> >> > and
> >> >> >> > converted it to my new programming site.
> >> >> >> > http://sites.google.com/site/alexbarry/
> >> >> >> > Check out the projects page to keep up to date with my progress.
> >> >> >> > I
> >> >> >> > now
> >> >> >> > have
> >> >> >> > the camera system built and have done some testing and I think
> >> >> >> > within
> >> >> >> > this
> >> >> >> > week, I'll have an official release.
> >> >> >> >
> >> >> >> > Take care,
> >> >> >> > -Alex
> >> >> >> >
> >> >> >> > On Mon, Jul 5, 2010 at 1:27 PM, Alex Barry <
> alex.barry at gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> Right now I'm working on building the glasses/camera system,
> but
> >> >> >> >> I'm
> >> >> >> >> at
> >> >> >> >> my
> >> >> >> >> parent's place helping them out this week, so probably closer
> to
> >> >> >> >> the
> >> >> >> >> end of
> >> >> >> >> the week, I'll have something working, maybe with some
> >> >> >> >> configuration
> >> >> >> >> stuff,
> >> >> >> >> too.
> >> >> >> >>
> >> >> >> >> Ya, Sam, it's a pretty neat project - I'll probably end up
> >> >> >> >> ripping
> >> >> >> >> EyeWriter apart and just using opencv (they use openframeworks
> >> >> >> >> for
> >> >> >> >> their
> >> >> >> >> project, and that adds a lot of bulk to a project that doesn't
> >> >> >> >> need
> >> >> >> >> it).
> >> >> >> >>
> >> >> >> >> Take care,
> >> >> >> >> -Alex
> >> >> >> >>
> >> >> >> >> On Mon, Jul 5, 2010 at 1:15 PM, Sam Lantinga <
> slouken at libsdl.org>
> >> >> >> >> wrote:
> >> >> >> >>>
> >> >> >> >>> This sounds very cool, I'd love to hear what comes of this! :)
> >> >> >> >>>
> >> >> >> >>> On Sun, Jul 4, 2010 at 5:02 AM, Alex Barry
> >> >> >> >>> <alex.barry at gmail.com>
> >> >> >> >>> wrote:
> >> >> >> >>> > After doing a lot of searching, it looks like by best bet is
> >> >> >> >>> > something
> >> >> >> >>> > called "EyeWriter" - it'll take a few tweaks, but once it's
> >> >> >> >>> > done,
> >> >> >> >>> > i'll
> >> >> >> >>> > post
> >> >> >> >>> > the code to link it up with SDL's events (probably as a
> >> >> >> >>> > user-event),
> >> >> >> >>> > as
> >> >> >> >>> > well
> >> >> >> >>> > as a demo application.
> >> >> >> >>> >
> >> >> >> >>> > Thanks,
> >> >> >> >>> > -Alex
> >> >> >> >>> >
> >> >> >> >>> > On Sat, Jul 3, 2010 at 11:05 PM, Kenneth Bull
> >> >> >> >>> > <llubnek at gmail.com>
> >> >> >> >>> > wrote:
> >> >> >> >>> >>
> >> >> >> >>> >> On 03/07/2010, Alex Barry <alex.barry at gmail.com> wrote:
> >> >> >> >>> >> > Maybe the community can come up with some creative
> >> >> >> >>> >> > suggestions?
> >> >> >> >>> >> > This is probably how I'll have to approach it:
> >> >> >> >>> >>
> >> >> >> >>> >> > Have two infrared lights, one approximately inbetween his
> >> >> >> >>> >> > eyes,
> >> >> >> >>> >> > the
> >> >> >> >>> >> > other
> >> >> >> >>> >> > covered from the camera, but pointed at his eye. I put
> the
> >> >> >> >>> >> > camera
> >> >> >> >>> >> > on
> >> >> >> >>> >> > infrared mod, and I should get the light near the middle
> of
> >> >> >> >>> >> > his
> >> >> >> >>> >> > face,
> >> >> >> >>> >> > and
> >> >> >> >>> >> > the light reflecting off his eye - from there, I'd assume
> >> >> >> >>> >> > the
> >> >> >> >>> >> > pupil
> >> >> >> >>> >> > would
> >> >> >> >>> >> > reflect the most, so I just compare the distance/angle
> >> >> >> >>> >> > between
> >> >> >> >>> >> > the
> >> >> >> >>> >> > two
> >> >> >> >>> >> > lights to approximate an x/y coordinate pair.
> >> >> >> >>> >>
> >> >> >> >>> >> I don't think the pupil is more reflective really, but the
> >> >> >> >>> >> pupil
> >> >> >> >>> >> is
> >> >> >> >>> >> where you would find an _additional_ reflection. Light
> >> >> >> >>> >> reflects
> >> >> >> >>> >> off
> >> >> >> >>> >> both the outer and inner surface of the lens. If you
> compare
> >> >> >> >>> >> the
> >> >> >> >>> >> positions of the reflections, you can find the direction
> the
> >> >> >> >>> >> eye
> >> >> >> >>> >> is
> >> >> >> >>> >> focused on relative to the light source and camera. You
> need
> >> >> >> >>> >> a
> >> >> >> >>> >> really
> >> >> >> >>> >> good camera and a dark room though.
> >> >> >> >>> >>
> >> >> >> >>> >> Alternatively, you can track the position of the iris or
> >> >> >> >>> >> pupil
> >> >> >> >>> >> by
> >> >> >> >>> >> color, since there's a big contrast between them and the
> rest
> >> >> >> >>> >> of
> >> >> >> >>> >> the
> >> >> >> >>> >> eye. You can use the "red eye" effect to increase this
> >> >> >> >>> >> contrast.
> >> >> >> >>> >>
> >> >> >> >>> >> try these links:
> >> >> >> >>> >> http://en.wikipedia.org/wiki/Eye_tracking#Tracker_types
> >> >> >> >>> >>
> >> >> >> >>> >>
> http://www.diku.dk/hjemmesider/ansatte/panic/eyegaze/node9.html
> >> >> >> >>> >>
> >> >> >> >>> >> If you can't track the eye accurately enough to pinpoint a
> >> >> >> >>> >> location
> >> >> >> >>> >> on
> >> >> >> >>> >> screen, you could roughly track large eye movements instead
> >> >> >> >>> >> and
> >> >> >> >>> >> use
> >> >> >> >>> >> them to bump a cursor around. So if he looks left, it
> bumps
> >> >> >> >>> >> the
> >> >> >> >>> >> cursor to the left, if he looks right, it bumps the cursor
> to
> >> >> >> >>> >> the
> >> >> >> >>> >> right, etc.
> >> >> >> >>> >>
> >> >> >> >>> >> > Does this sound reasonable? This would also make it easy
> >> >> >> >>> >> > for
> >> >> >> >>> >> > blink
> >> >> >> >>> >> > detection, and I could use three lights, one for each
> eye,
> >> >> >> >>> >> > and
> >> >> >> >>> >> > the
> >> >> >> >>> >> > last
> >> >> >> >>> >> > one
> >> >> >> >>> >> > for a reference point.
> >> >> >> >>> >> >
> >> >> >> >>> >>
> >> >> >> >>> >> You should only need one light. Unless you're using a
> laser
> >> >> >> >>> >> (which
> >> >> >> >>> >> you shouldn't), each light will reflect off his entire
> face,
> >> >> >> >>> >> not
> >> >> >> >>> >> just
> >> >> >> >>> >> wherever you point it. You could recognize the position of
> >> >> >> >>> >> his
> >> >> >> >>> >> head
> >> >> >> >>> >> by contrast with the background (white wall, pillow, etc)
> >> >> >> >>> >> (this
> >> >> >> >>> >> is
> >> >> >> >>> >> where OpenCV might help), then recognize the position of
> his
> >> >> >> >>> >> eyes
> >> >> >> >>> >> by
> >> >> >> >>> >> the higher reflectivity. That's before you actually get
> >> >> >> >>> >> around
> >> >> >> >>> >> to
> >> >> >> >>> >> figuring out where he's looking though.
> >> >> >> >>> >> _______________________________________________
> >> >> >> >>> >> SDL mailing list
> >> >> >> >>> >> SDL at lists.libsdl.org
> >> >> >> >>> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >> >>> >
> >> >> >> >>> >
> >> >> >> >>> > _______________________________________________
> >> >> >> >>> > SDL mailing list
> >> >> >> >>> > SDL at lists.libsdl.org
> >> >> >> >>> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >> >>> >
> >> >> >> >>> >
> >> >> >> >>>
> >> >> >> >>>
> >> >> >> >>>
> >> >> >> >>> --
> >> >> >> >>> -Sam Lantinga, Founder and President, Galaxy Gameworks
> >> >> >> >>> LLC
> >> >> >> >>> _______________________________________________
> >> >> >> >>> SDL mailing list
> >> >> >> >>> SDL at lists.libsdl.org
> >> >> >> >>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> > _______________________________________________
> >> >> >> > SDL mailing list
> >> >> >> > SDL at lists.libsdl.org
> >> >> >> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
> >> >> >> _______________________________________________
> >> >> >> SDL mailing list
> >> >> >> SDL at lists.libsdl.org
> >> >> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >
> >> >> >
> >> >> > _______________________________________________
> >> >> > SDL mailing list
> >> >> > SDL at lists.libsdl.org
> >> >> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> http://codebad.com/
> >> >> _______________________________________________
> >> >> SDL mailing list
> >> >> SDL at lists.libsdl.org
> >> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >
> >> >
> >> > _______________________________________________
> >> > SDL mailing list
> >> > SDL at lists.libsdl.org
> >> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> http://codebad.com/
> >> _______________________________________________
> >> SDL mailing list
> >> SDL at lists.libsdl.org
> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> >
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> >
>
>
>
> --
> http://codebad.com/
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100722/bc71d39e/attachment.htm>
More information about the SDL
mailing list