Geeks making the world a bit better.

Entries Tagged Mac

Making CVtypes work on the Mac

I’m writing this down because I don’t see complete working (for me at least) directions anywhere else.

  1. Install xcode from the Mac OS X install CD
  2. MacPorts (everyone calls it DarwinPorts)
  3. Get and unpack the opencv source tarball
  4. cd opencv; mkdir build; cd build
  5. ../configure CPPFLAGS=”-I/opt/local/include” LDFLAGS=”-L/opt/local/lib” –without-python
  6. make
  7. sudo make install

I also needed the macam webcam driver to use my Logitech webcam. I believe the notebooks have a camera built in so you should be good to go on one of those.

I’m getting tons of error messages like these as my app is running and I’m only getting about 5 frames per second. What’s up with that?

2008-02-14 09:00:23.983 Python[85901:6d37] *** Break on _NSLockError() to debug.
2008-02-14 09:00:24.179 Python[85901:880f] *** -[NSLock unlock]: lock ( '(null)') unlocked from thread which did not lock it

Also, I note that video doesn’t start until I move the mouse. Are these macam bugs?

Bringing OS X compatibility to our apps

I regularly get requests from teachers at schools that are Mac based for versions of our software that will work for them. I want every kid to have access to our stuff so I bought a Mac mini for development. I’d rather be running OS X in a virtual machine but Apple won’t let me do that. So I’ve got the mini sitting here with its video out connected to one of the inputs on my right projector and I hacked a python wrapper for synergy server to switch the projector source when I move the mouse off my Ubuntu desktop onto the mini. It works great. Combine that with MacFusion for file sharing and routing the mini’s audio output into the line-in on my Ubuntu machine and it is just about as good as a VM would be.

Pygame seems to work fine on the mini so most of what I need is there. Good deal.

But it sure is frustrating to try to get anything else going. First there is hardly any information online. What I find is often out of date and useless because so much seems to change from release to release. Then when something doesn’t work I don’t know who to ask. In contrast on Windows or Ubuntu there are huge and active communities of hackers like me who 1) figure stuff out and 2) write it down where Google can find it. The problem is usually culling through millions of results. On queries related to OS X the problem is I get 5 hits, 3 of which are asking the same question with no answer. The documentation at Apple is horrible and either not indexed by Google or not indexed well. I seriously don’t know why software developers put up with it. I guess they like being pioneers. I just want to get the job done…