Just a patch to the touchlib revision 3 in the google code repository is here.
There is a README.APPLE included, and also posted here:
Make sure you have XCode installed, then install OpenCV(I installed from their
latest CVS). Assuming you installed OpenCV to /usr/local, you should just be
able to run ‘make’ in this directory to build both the configapp and the
sampleapp.
I don’t think the configapp’s calibration works quite right yet because I had
to combine the two threads in configapp/CTouchScreen to get around some
problems with HighGUI in OS X. (It has issues updating window images in a
different thread than where the keyboard callback is it appears)
Right now, for video input, I’m just using OpenCV with CvCaptureFilter. It’s
fast enough for my testing so far, and it supports Quicktime cameras, and when
I get around to using this on Linux, V4L ones. I did get VideoWrapper’s QT plugin
kinda working, but for some reason the image is upside down and it has some
interesting Big/Little endian problems on my Intel Mac. It also appears to be
slower the using the OpenCV camera input from my informal testing.
We don’t have a working FTIR screen up yet, that’ll be sometime this week, so
the only real testing I’ve done so far is with a TV remote pointed at the
camera.
Hi Dan,
I’ve been hoping to make a multi-touch screen and this is my first post on the forum. My name’s rick and im a graphic designer from the uk. I find doing little projects like this quite enjoyable but am suffering from the following problem. I’m not a coder at all as you’re about to see. I’m complete rubbish at all this makefile/install stuff. I’m trying to install your software but i dont know what to do. The openCV library needs this thing called ch which i now have but dont know how to install, and therefore i cant install opencv. And when i do i doubt ill know what to do with opencv and my webcam.. I’m using an ir modded logitech quickcam zoom on usb with a mac mini. can you give me any help.
I am looking at using Linux for my environment as well as a MAC and I would like to say thanks for doing the porting work so far. Great Job.
I have only briefly looked at the code but I was thinking porting this to Linux would be my first job once I have my camera up and running. I would love to know if you have already embarked on this or if you are still considering doing so. Either way it has been many years since I coded for a PC (I am a control systems programmer by trade) so I am sure I will be quite rusty. I may fly a few questions your way if thats ok.
I got the latest version of TouchLib compiled on OSX. It starts up fine and then quickly dies with errors like
sampleapp(28090,0x184a200) malloc: *** error for object 0x14930a0: double free sampleapp(28090,0x184a200) malloc: *** set a breakpoint in szone_error to debug Bus error
and
sampleapp(28083,0x184a200) malloc: *** Deallocation of a pointer not malloced: 0xffffffff; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Any tips? Like I said, it pops up for a moment shows me the 5+ screens/sliders and then crashes.
Other than changing some minor bits of touchlib code and a few sample tweaks, I have yet to really dig into the code itself.
thanks for the effort bakercp, i’m sure alot of people need your input on this, but the community is growing rapidly so i hope more mac developers will be arriving soon
For those who are insterested, I did it all using the inclued cmake scripts. There were only a couple tiny changes here and there. I’ll do a little writeup tomorrow. Hopefully I’ll have a chance to look at the OS X-related memory issues too.
if you have the stuff compiled with mac os, would you be able to write a small tutorial for the new website? we are trying to make all kinds of different tutorials for the new website, like how to compile touchlib for windows, mac osx, linux, how to build a screen, how to setup your flash apps with multitouch and stuff.
The current trunk revision (58) won’t build on OSX, I am assuming because of some compiler pickyness. I’m guessing the ITouchScreen interface changed at some point and expects setParameter(std::string, char*,char*) instead of setParameter(char*, char*, char*)
It is causing configapp, sampleapp and a couple of the demos to fail. If I go ahead and fix those, the apps will run briefly and either bus error or segfault.
The applications run for a few seconds, then crash, with varying error messages. So far I’ve seen:
configapp(6617,0x1817e00) malloc: *** error for object 0x139fc50: incorrect checksum for freed object - object was probably modified after being freed,
break at szone_error to debug
configapp(6617,0x1817e00) malloc: *** set a breakpoint in szone_error to debug
Segmentation fault
Bus error
doClip: empty path.
Bus error
configapp(6602,0xa000d000) malloc: *** Deallocation of a pointer not malloced: 0xffffffff; This could be a double free(), or free() called with the middle of an allocated block;
Try setting environment variable MallocHelp to see tools to help debug
Segmentation fault
sampleapp(6597,0xa000d000) malloc: *** error for object 0x13a1e30: double free
sampleapp(6597,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
Bus error
But the errors seem entirely random. Sometimes I can start the applications and they run fine, othertimes they crash straight off. Either way, the camera view windows are innaccessible (spinning ball on OSX), so you cannot change the scrollbars, etc.
Ah well. I can fiddle, but without a better understand of the code, I don’t think I can do much.
I compiled mine for PPC os 10.4.9 and I can access the scrollbars. I dont know if davman has the latest opencv version or not, I do. I have only played around with it for like 10 minutes or so.
Alain
I’ve sent this to the mailing list (I think), but I havent seen it show up in the archives. However i’m a mailing list n00b, so maybe I’m looking in the wrong place.
I don’t know anything about real programming but i wonder why isn’t anyone trying to do just the blob detection over OSX:s powerful functions like quarz composer, core image, (and in leopard core animation)?
I tested the quarz composer and it seems to have very powerful filters built in the operating system somehow…
Any progress on this? Would love to be able to use Touchlib on my Mac - followed the instructions in the Wiki, compiled it and I’m getting one of the errors described above:
sampleapp(11726,0x183e600) malloc: *** error for object 0x1371d40: double free sampleapp(11726,0x183e600) malloc: *** set a breakpoint in szone_error to debug Bus error
ding, you say you compiled for PPC - how would I try that? I think I compiled a UB by default. Any help would be appreciated. Thanks!