[SDL] SDL and OpenCV
Alex Barry
alex.barry at gmail.com
Mon Jul 5 10:27:54 PDT 2010
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20100705/76580f37/attachment.htm>
More information about the SDL
mailing list