1 of 6
1
OS X Multitouch? 
Posted: 19 March 2008 02:02 PM   [ Ignore ]
New Member
Rank
Total Posts:  9
Joined  2007-12-31

Hello,
I would like to get a feel for how much interest there would be for more OS X development in the way of multi-touch. I think OS X is the ideal platform for multi-touch applications, especially because of frameworks like Core Animation and Core Video. Right now I am using OS X for my multi-touch table and OpenTouch for my blob detection. Is there anyone else using OS X in their projects?
What kind of tools would be considered helpful for those wanting to use OS X? Some projects I would like to work on include porting OpenTouch to be a Cocoa application and utilizing frameworks like Core Video (this would allow it to be GPU accelerated), a Cocoa framework for receiving TUIO messages in a Cocoa application, and some tools for allowing Core Animation layers to respond to multi-touch events. What do you think of these projects? Which would be the most helpful?

TTFN
Bridger Maxwell

Profile
 
 
Posted: 19 March 2008 02:43 PM   [ Ignore ]   [ # 1 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

Take a look at my post in the Other section in software topic of the forum. As far as the Core Frameworks go, they would be nice for application development, but not so much for the development for the driver. Catch me in IRC I can talk in more detail there.

Profile
 
 
Posted: 20 March 2008 09:20 AM   [ Ignore ]   [ # 2 ]
Elite
Avatar
RankRankRankRank
Total Posts:  194
Joined  2007-05-05

hi bridgeyman,

I would really be interested in an OSX tracking solution. I tried reactivision 1.4 beta, but have trouble with plain finger tracking since it only looks
for perfectly round blobs, which is not optimal with DI setups. I also tried libavg, which kind of works, but setup and installation is quite complicated,
at least for me. Since the TUIO protocoll is not (yet) implemented, I only have a small flash demo which draws circles. I am also having trouble with
the calibration (crashes a lot) and my blobs seem to loose their ids constantly. This could be solved with correct settings I guess. There have been lots
of updates with libavg, but I can“t compile it right now, keeps throwing errors....

Anyway, would love to save some space on my machine and get rid of my bootcamp xp...smile

 Signature 

Blog: http://iad.projects.zhdk.ch/multitouch/
180 Project: http://www.timroth.de/180/

Profile
 
 
Posted: 20 March 2008 10:51 AM   [ Ignore ]   [ # 3 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

http://multitouch.uacodeweaver.com/

Profile
 
 
Posted: 20 March 2008 11:13 AM   [ Ignore ]   [ # 4 ]
Elite
Avatar
RankRankRankRank
Total Posts:  194
Joined  2007-05-05

looks good, but no version to download as of now, right?
Really looking forward to this, great work!

 Signature 

Blog: http://iad.projects.zhdk.ch/multitouch/
180 Project: http://www.timroth.de/180/

Profile
 
 
Posted: 20 March 2008 11:37 AM   [ Ignore ]   [ # 5 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

Thanks. No version to dl right now. The first “beta version” is almost done. We are doing this for a school project. The due date is the 24th of April. I will release the beta around that time. However is only a temporary solution. I plan on taking the summer to overhaul the code into Obj-C land. The beta will be a little clumsy, but something is better than nothing.

I will post some video demos later today.

Profile
 
 
Posted: 20 March 2008 03:24 PM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  9
Joined  2007-12-31

I am a little fuzzy on how this works. Will the finished product be an application that you launch? I think I am a little confused by the term “driver.” Where will the driver run? As part of the kernel?  Also, will you be able to receive TUIO messages? Looks like a great project, and I am sure it will help out the group a lot.

Profile
 
 
Posted: 20 March 2008 03:48 PM   [ Ignore ]   [ # 7 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

The term driver is used purely in a metaphorical sense. I feel that my application, touchlib, and all the like are not really classified as a traditional piece of software. While they may not be designed like a traditional driver, they function like one. They interface with a piece of hardware, our screens, and provide other applications access to that hardware.

I do not plan to integrate TUIO messages into my driver application. I decided to use operating system defined event types. OS X provides tablet events for devices like the Wacom tablets natively. Thus, theoretically my screen will work with tablet ready apps like Photoshop.

Yes, it is an application I will launch. Currently it is starting out as a senior project for a colleague and I for our CS degrees. Our project is due at the end of April. Currently, the project is done in C/C++ and Carbon. I am calling this version my beta version. I plan to take the the summer to rewrite it in Obj-C and Cocoa. The reason I am calling the Carbon version a beta version is because the UI will not be as polished and stream lined as I would have liked it to be. However the functionality of the beta version will be complete and fully optimized for performance. I will only be releasing the the executable for the beta version until I choose an open source license that will be in the best interests of the project.

Please feel free to catch me in IRC or check out my site linked above for more information.

Profile
 
 
Posted: 24 March 2008 02:48 PM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  10
Joined  2007-10-16

does anybody know if the multytouch api that is used on the new macbook pro’s and the iphone is usable for other multytouch applications?

thanks,
Ben

Profile
 
 
Posted: 25 March 2008 07:45 PM   [ Ignore ]   [ # 9 ]
Sr. Member
Avatar
RankRankRank
Total Posts:  73
Joined  2008-03-23

Hello All,

I am newish around here and I am working on an OSX/Cocoa MT table (using DI at the moment).  I am doing it for the fun of it, but my ‘day’ job is a software developer for the mac, so I am very interested in the machine vision aspects of the project so I am writing my own blob-detection algos and such. 

At the moment I am shooting just for fingertip recognition but want to expand to fiducials in the future. I ahve only been at it for a few weeks now in my spare time, and it is kinda working, but nothing that I could put up for public use.  Once I have a ‘working’ version i will put it up somewhere so you guys can check it out, and once the code is fairly stable i will post that too.  (probably not for awhile now grin

As far as inter-application use (ie TUIO or OCD or whatever) my thinking hasn’t gotten that far grin

anyhow, i put a bunch of stuff up on my website over the past few days, you can check it all out here:
http://benbritten.com/blog/category/multitouch/

cheers!
-panda

 Signature 

http://benbritten.com/blog/category/multitouch/

Profile
 
 
Posted: 26 March 2008 07:03 AM   [ Ignore ]   [ # 10 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

Panda,

In your blog you show an image of your blob tracking. Obviously the green background image is something you are drawing, but I am curious as to the origins of the other image. Is that image from the camera or is that image drawn based on what the camera sees? You mentioned you are doing a background subtraction. I am interested in knowing what libraries you are using to do your image processing. If you are using Core Image Filters, I may have some more questions. I would love to exchange some information with you, if you are interested.

Please feel free to contact me via GTalk:ccerinojr@gmail.com or via AIM: uacodeweaver.

Cheers,
macdaddy

Profile
 
 
Posted: 26 March 2008 06:51 PM   [ Ignore ]   [ # 11 ]
Sr. Member
Avatar
RankRankRank
Total Posts:  73
Joined  2008-03-23

Hey Macdaddy,

good question, heh, it has already changed quite a bit since then so I had to go back and look to remind myself… anyway:
the right hand window is basically the ‘configure’ window, and yes the image you are seeing is (as you say) an image drawn based on what the camera sees. 
the raw image looks something like this:
http://benbritten.com/blog/wp-content/uploads/2008/03/photo-43.jpg
although that one is the first prototype, but the images are very similar. 
The blobs there are the ‘result’ bitmap.  It is generated by the raster that subtracts the background and applies the threshold. 

As far as libs, I am really only using the sequence grabber (via a highly modified version of this: http://www.skyfell.org/cocoasequencegrabber.html) and my own bitmap filter code.

I had been using some vImage stuff, but i found in the end that no matter what i did with the image beforehand, I still had to go and look at every pixel in order to do the image segmenting (ie blob finding).  Since the big processor draw was the pixel-by-pixel blob search, i decided just to combine everything and do it all at once.  In the end it is pretty straightforward (so far grin
here is how it goes:
First i modified the Cocoa Sequence Grabber to generate only single color bitmaps instead of RGBA ones.

then i get a background image (i take one right as the the camera starts up, or you can take a new one if the lighting changes or you move the cam, whatever)
for every source image, and for every pixel (in the specified region of interest), check to see the value difference from the same pixel in the BG, if it is above a certain amount, it is ‘good’, go into a recursive loop finding all the pixel’s ‘good’ neighbors, repeat until there are no more pixels.

then do some basic filtering on the resultant blobs (merge any that are close enough to be the same blob, get rid of any that are too small or too big etc..) then pass those raw ‘pixelblobs’ onto the analyzer which decides if they are new, or just old blobs that have moved etc…

And that is of course, just the set of code that is working the best right now.  I also started a quartzcomposer patch, and a quick blob tracking test program using QTKit/QTCapture (which is awesome, except you cant control the camera image (ie exposure etc) from QTKit.  once that is possible i will absolutely abandon the SG libs in the old quicktime.

All this said, I am also looking at the vImage stuff (or core video and all that) and then simplifying my raster code.  I am kinda doing it the ‘hard’ way right now because it is working, and because i needed to have a good grasp on what kind of manipulation each pixel needs before i go in throwing big filters at it grin (that and I think that really, at the base of things, the filters are nice and all and make it easier for me to ‘see’ the blobs, but ultimately the data is all in the original image so theoretically i should be able to get the blobs out without them (which is kinda what I am doing)

Sorry, that was kinda long and rambling, i just got up, haven’t had my caffeine yet. (and the code isnt really done yet, which is why it is all kinda vague) i hope it made some sense. I am planning on doing a blog post about it all in more detail once I have it all pinned down. feel free to ask any questions either here or email me: nui (at) benbritten.com (tho you might give me a heads up here if you do, sometimes my junkmail filter can be overly aggressive grin

-panda

ps: i would be more than happy to send you the code I have so far, but it is in a gigantic mess, and is in constant flux at the moment.  If you give me a week or two more ( maybe three grin i am shooting for an early beta that you could just install (or compile yourself, or modify or whatever)

 Signature 

http://benbritten.com/blog/category/multitouch/

Profile
 
 
Posted: 27 March 2008 03:13 PM   [ Ignore ]   [ # 12 ]
Jr. Member
Avatar
RankRank
Total Posts:  38
Joined  2008-01-31

Sounds a loosely similar to what I am doing. I should have a final version out for use around the beginning of May, along with a paper documenting my approach.

Profile
 
 
Posted: 27 March 2008 06:52 PM   [ Ignore ]   [ # 13 ]
Sr. Member
Avatar
RankRankRank
Total Posts:  73
Joined  2008-03-23

Excellent! I will be very interested to see/read about it all.  (and learn from it, and take all your best ideas! ha! just kidding)

The biggest problem I am having right now is even illumination (of course, seems to be the biggie for DI setups) but I think i may have figured out a partial solution with basically a hinted luma-key, or a variable difference matte (or whatever you want to call it) where i basically use a ref image (the background image probably) to generate a luminance map of the surface (ie how bright and dark the light is) and then use that to inform the thresholding filter.  Anyway i did some work on it yesterday and it looks promising, i am doing some more testing today and I will let you know how it goes. 

Also, since i am stumbling headlong into this (because it is fun) I am probably going where many people have gone before, but just haven’t read enough about it to realize it yet.  But if i am reinventing the wheel again and again, i am enjoying the process.

Cheers!
-panda

 Signature 

http://benbritten.com/blog/category/multitouch/

Profile
 
 
Posted: 14 April 2008 01:15 PM   [ Ignore ]   [ # 14 ]
Sr. Member
RankRankRank
Total Posts:  58
Joined  2007-07-09

Bridger,

I see you are the one trying to port opentouch to cocoa.  I think this is great. I wish more people where working on cocoa stuff. How is your progress coming along? I see that so far you have an appdeligate that inits camera capture and applies some core image filters.  I am curious as to where you are going next?  Do you plan on sticking with core image exclusively or are you going to use some opengl? Also is this going to use the blobslib library or some other method? Finally if so I hope you know that blobslib doesn’t have an unique blob identifier so you will have to implement one yourself.  This is where I am at so if you come up with something nifty for imbedding a unique id on blobs from frame to frame let me know.

Alain

Profile
 
 
Posted: 20 April 2008 10:42 PM   [ Ignore ]   [ # 15 ]
New Member
Rank
Total Posts:  9
Joined  2007-12-31

Hey Ding. Right now I have am working on getting the blob tracking in. I am going to be using the current blob tracking code used in OpenTouch. Is that blobslib? I don’t know if there is a better choice or not, but I thought I would give it a go. I don’t think I will be using any opengl, as I don’t know any! For the tracking of blobs, I think I will just work of PortVideoBlobDetection and see how Pawel managed it. Thanks for showing interest! I was hoping to get it all programmed in time for it to be used as part of my science fair, but seeing how my multi-touch table needs to be packed up and shipped by Thursday, and this week is finals week, I don’t think that is going to be possible. rasberry

TTFN
Bridger Maxwell

Profile
 
 
   
1 of 6
1