Compiling ARToolkit on Ubuntu 10.04

Apparently I’ve given more thought on to ARToolkit these days  (mainly due to my research), so that it makes me  attempt different things with it. Consequently I’ll be writing a series of posts pertaining to my small experiments for future references. I know it’s pretty boring stuff, talking about a dull subject again and again… but it merely gives us a sensation when doing it physically (particularly when you have nothing left to do 😉 ). In general everybody feels great when their imaginations turn into a physical realization.

ARApplicationInUbuntu

So… enough lecturing & let me keep aside my talking. In today’s post I’ll cover-up the installation of ARToolkit in Ubuntu 10.04. Continue reading “Compiling ARToolkit on Ubuntu 10.04”

Demistifying DSVL Configuration

directx-logoIn my previous post I just mentioned how we can use ARToolkit in conjunction with a 3D rendering engine. The camera connection was made by the ARToolkit via DSVL (DirectShow Video Library) . As I promised, through this post, I’ll expose how we can configure DSVL with its supported parameters.

DSVL is a wrapper for DirectShow which in turn is a part of DirectX. We all know that DirectX is the prominent media framework used in windows platforms. Other than DirectShow, Direct3D and DirectSound also come under the brotherhood of DirectX. So what is the specialty of DirectShow? In computers data can be generated in many places, such as file system, network, TV cards or video cameras etc. And data which is produced at each of these locations take many formats. Therefore front-end applications have to explicitly communicate with these underlying data sources and deal with its formats. Obviously this would be pretty cumbersome and overwhelmingly incompatible with different hardware devices. This is where DirectShow comes in to handy. It synchronizes and unifies all the communication flow between our application and the underlying hardware. In particular DirectShow talks directly with the camera drivers, capture card drivers etc… and provide feedback for the user application. This is the simplest way we can understand it, but for more details go here http://msdn.microsoft.com/en-us/library/windows/desktop/dd375454(v=vs.85).aspx .

Continue reading “Demistifying DSVL Configuration”

MySql C++ Connector Problem when Retrieving values with getString()

Recently I’ve been messing around with MySql Connector for C++ in a Fedora core 10. I used Eclipse CDT (Galileo) for compiling/debugging  and it was always giving incomplete result sets whenever getString() method was called. Incomplete in the sense it gives only the first row of the result set inside the loop for enumerating result set items.

I had a carefull observation at the build output and it was popping some sort of a message like ‘libstdc++.s0.5 needed by libmysqlcpp.so might conflict with libstdc++.so.6’. There were no compile time errors neither runtime errors.However in the Debug mode I observed it line by line and came to know it crashes at the first occurence of the getString() method. I was stumbling around with this for somr time and finally able to dismantle the issue.

What I did was I just removed the libstdc++.so.6 from the lib. And remove any files with a name like ‘libstdc++.so.6.something’. Doing this caused to display the build output smoothly (without the above warning message) and getString() method returned all the items in the result set as well. Hope this work around might be useful for anyone to get rid of this headache.

Sharepoint Deployment (MOSS)

Sharepoint deployment waz not that eazy. There’s no defined method to do that. But we can use some mechanisms wchich are built into MOSS. One such component is stsadm. For the deploymet purposes we can use either export/import or backup/restore mechanisms. My recommendation is export/import since the latter is appropriate for a catatrophic scenario. Our friendly stsadm tool will help to perform export/import.

First you export your custom sharepoint site from your development server into a file with a .dat extention. This file can be imported from the target server (at client end may be) so that we can deploy the customized version at client’s end this way. Within the import command we can specify the site collection as below.

stsadm -o import -url http://<servername>/site -filename <filename>

Although we can deploy a site collection like this, change requirements might raise some issues. for example if the client need to change the UI and all the styles, we have to export and import for each client requirement. and the data which was originally existed might be replaced due to the new import operation. This is not what developers would like to confront.

Therefore the solution to tackle this scenario is the Web Solution Packages (WSP). Package all UI components and style sheets into a one bundle as a feature and deploy it.  This involves creating a manifest file, feature manifest file, feature file and a data definition file (.ddf). As for my opinion, this is the best way for deploying standalone components to a front-end wwweb server. After the deployment, you can enable the feature from Site collection features under Site Actions. For the purpose of deploying .wsp files (cab file with a .wsp extention) we can following commands.

stsadm -o addsolution -name <filename>

stsadm -o deploysolution -name <filename> -local

This way, sharepoint developers can easily handle change requirements.

Knight Rider Circuit for AVR Micro controller

I crafted a code snippet which would give us the lighting sequence of famous Knight Rider car. This would work in Atmel ATMega 16 series micro controller and the program consumes only 266 bytes. Following goes the code.

#include <avr/io.h>

typedef unsigned char  u08;

int main( void )
{

u08 led, i, j, k,flag;
DDRC = 0xff;

led = 1;
flag = 1;

for (;;)
{
PORTC = led;
if(flag)
led = led<<1;

else
led = led>>1;

if (!led && flag)
{
led = 128;
flag = 0;
}

if (!led && !flag)
{
led = 1;
flag = 1;
}

for (i=0; i<127; i++)   /* outer delay loop */
for(j=0; j<127;j++) /* inner delay loop */
k++;

}
}
The speed of the lighting sequence can be altered by adjusting the i and j values of the outer or inner loops. These loops will provide some delay for the circuit. If anybody who wishes to improve this code, go ahead and enjoy.

View Disk info on your web page

This is a very simple C# code snippet which allows you to display the Hard Disk info such as Total disk storage and Free Disk space on your machine. I found this intersting since it reveals a bit of local machine’s info through a browser.

Here goes the code.

using System.Management;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ManagementObject disk = new ManagementObject(“win32_logicaldisk.deviceid=\”c:\””);
disk.Get();
Response.Write(“Logical Disk Space = ” + disk[“Size”] + “bytes. “);
Response.Write(“Free space on C:\\ is ” + disk[“FreeSpace”] + ” bytes. “);
}
}

As you can see a Management object is created specifying the System Drive. You can access to its properties by the index of the Management Object. ex:- disk[“Size”] will give you the Total size of the drive.

Enjoy!!!

View the IP network path on a map

This is about a program which displays the path of a network packet in a map when u ‘traceroute’ to a server. As U know, when u traceroute to a particular server, the resulting IP addresses are the routers that the packets passed through on their way to the destination.

So in this program, the Geo-location of the ip address is obtained by a web service provided freely by the HostIP. And once you obtained the location in terms of lattitude and longitudes, then you can mark that location in a Virtual Earth API provided by Microsoft Mappoint services.  And finally the network path is drawn in the map.

 tracertmap1.jpg

You can also find a tool similar to this in Google Gadgets. U can add one of those gadgets when u customize your Google Personalized Home page.

For more info about this Trace Route Map tool, visit here.