OpenCV & ffmpeg

Just a quick pointer to all the poor souls who’re trying to get OpenCV to read/write video files under Linux. Maybe it helps someone to avoid wasting as much precious time as me in trying to get this to work…

  • The first thing to note is that you need ffmpeg for video functionality. It has to be compiled and installed before compiling OpenCV.
  • The second thing to note is that ffmpeg has no stable API and also no releases (what a combination!). Of course OpenCV will not compile against the current version of ffmpeg…
  • So the third thing to note is that the version of ffmpeg that you need for OpenCV is here (found via Google).

Now just compile and install ffmpeg (using the –enable-shared option) and then compile and install OpenCV again (check in the output of ./configure that ffmpeg support is actually enabled). That should do the trick. Now you can read and write most video formats.

No Comments

Profiling applications on Windows

The (C++)-software I develop at the university has to run on Linux and on Windows. So yesterday I booted Windows again and started Visual Studio 2005 Professional Edition which I got for free via the MSDN Academic Alliance. After fixing a few bugs the software eventually compiled.
But when I started it, it became very obvious that something was slowing it down considerably. OK, no problem, i thought. Just profile the damn thing. After about two wasted hours I found out the following:

This all means one of two things. Either I’m too stupid to find the right tool (in which case I’d appreciate if someone could point me to it), or there is no such tool. And I won’t pay several thousand dollars just for a profiler!
Either way, if I compare the situation with Linux, where excellent free (as in speech and in beer) tools such as valgrind are available for everyone, I really can’t see how anyone who has the choice would choose Windows as his development platform. I for one am thankful that I don’t have to put up with it too often.
I had always thought that Microsoft is trying to attract developers with things like the Academic Alliance, but in my opinion a profiler is a very basic tool for a software developer. Expecting developers to pay (and pay so much) for such a basic tool is something I can’t understand.
And of course I still don’t know why my software is so slow on Windows…

No Comments

More problems with tagging

Jason Brown has an interesting post titled "Why Tagging Will End Up A Bad Idea". It addresses a different issue with tags, namely that different people use slightly different tagging systems. The consequence is that you can only use the most general tags (like e.g. linux) to find what you are looking for. More specific tags will probably yield much less results because everyone uses different specific tags.
This is a problem for the social aspect of blogging and social bookmarking.
Interesting read.

No Comments

Blogging in multiple languages

I’m very new to blogging but I already see a big problem for me as a speaker of at least two different languages. I’m from Germany, so german is is my mother tongue, but at the university I have to speak a lot of english, so I have a basic knowledge of that, too.
Writing in english has of course the additional advantage that much more people can read what I write, so I’ll probably write in english most of the time. But nevertheless I would sometimes like to blog about something in german (perhaps because it’s not really relevant to non-german-speaking peaople). The question is how to do it right?
I see several possibilities and problems with them:

  • Use tags like lang:en and lang:en or english and german
    Problems:

    • The rest of the tags are still in only one language
    • It seems not very elegant to stick one of those to every post.
  • Translate the whole blog
    Problems:

    • This is a very time-consuming thing to do
    • I don’t even want all posts to be translated
    • This is probably also technically non-trivial to do
  • Use two seperate blogs
    Problems:

    • People on one blog can’t see the posts on the other
    • Additional overhead to maintain second blog
    • Two different URLs to remember

So all these possibilities are undesirable for one reason or another. Unfortunately I don’t even know what an ideal solution would look like. I’ll have to think about it for a while…
A related problem is with tags on del.icio.us, which I also use. There I have the problem of how to tag german websites. Should I duplicate all tags in german? What about tags where the german translation is the same word or where there is no translation (like e.g. linux)? Should I again use tags like lang:de or lang:en? But that would force everyone to use them or else my german linux sites would show up for everyone. Or I could do nothing and just tag with english tags which of course has the same problem.
So I don’t see a clear solution here, either.
In the meantime I’ll just stick to english and see if I find a nice solution along the way (although I serously doubt that) :)

No Comments

Hello, world!

Since so many people seem to be blogging, I thought I’d try it out for myself. I had actually considered to do this once before, but back then I had no idea what to write about and so decided to leave it. This situation has not changed much since then, I’m afraid to say. I’ll just do it now anyway and see how it works out. Perhaps the situation was the same for most bolggers out there…

No Comments