Archive for June, 2010

Posted By Tommy

Silverlight vs. Flash

A handy SDK for Facebook apps: www.microsoft.com/facebooksdk

In my Master’s thesis I used Adobe Flash (AS3) and creating games is quite easy in Flash. It’s an ECMA language as is Java, so it’s easy to work with. On the other hand the backend integration is quite tricky. Adobe Flash Media Server is not free, and the universities don’t have licenses for it either. That caused me a lot of problems which were learning experiences for me, but figuring out which open source projects would work was not related to the learning goals I had been trying to achieve with my interactive educational platform. It would be much easier to use .NET development through the entire project than try to provide Bridges between different programming languages through socket programming.

Since there is already guides about ASP.NET development and Facebook, in my opinion it will be easiest to integrate Silverlight with that. Microsoft provides a number of free downloads and free licenses for university students including Visual Studio, Windows Server 2008 R2, SQL Server 2008, etc. through the official Microsoft student website www.dreamspark.com, so it’s easy for student projects to get access to their products. Also, the really interesting thing about using Silverlight for your Facebook project would be that it would also work with the new Windows Phone 7 platform that will be released later in 2010.

Posted By Tommy

Compiling OpenCV 2.0 with Visual Studio 2010

I had a couple of troubles setting up OpenCV 2.0 in Microsoft Visual Studio 2010. I simply updated the working build from VS 2008. It had been working fine. So the first thing I found out that there was an error with “std::back_inserter”. The problem is that it was part of the standard package, but now it’s not. This trouble affects two files: “cvmodelest.ccp” and cvhog.cpp” so it’s easily cured by adding 

#include <iterator> 

to cv.h. somewhere around line 60.

Another problem I encountered was a crash with videoInput.lib. It seems that it’s been compiled with VS2005 and it’s source code is not included. So with a bit of research I found that it’s not exactly a necessary thing to include anyway, so I followed the instructions:

http://www.opencv.org.cn/forum/viewtopic.php?f=1&t=9199

# On Windows: enabling the VideoInput library:

The libvideoInput.a library file provided by Willow Garage was built with the old SJLJ exception handling method. Therefore, you cannot link against it using compilers that use the new DWARF-2 exception handling method like MinGW 4.4.x, unless you rebuild the libvideoInput.a file using MinGW. The best bet for compilers using DWARF-2 is not to use VideoInput at all. This can be done by taking the following step:

1. Comment the line containing “#define HAVE_VIDEOINPUT 1″ (i.e. near line 101 or 105), in file src/highgui/_highgui.h.

In contrast, for old compilers using SJLJ like TDM, to have VideoInput included in OpenCV 2.0:

1. Edit file src/highgui/CMakeLists.txt
2. At line 199, insert ” ole32 oleaut32 uuid” at the end of the list of libraries to be linked against (i.e. after “videoInput strmiids”). The developers have forgotten to insert them.