Chronicles

It ‘s been a while since I last blogged. I wish everyone a happy new year 2010 as this happens to be the first post for this year. Lot has happened and importantly, a semester has gone past as I once again got busy doing a bundle of course works.

One of the first things to explore in the new year was gaming engines as I have been looking to create virtual 3D environments. And it became really serious after watching AVATAR, one of the first engines that impressed me was UNITY.

Being a desktop enhancement freak, yesterday after getting bored doing another coursework, thought of trying circle dock inspired by some of the concept videos. An open source version of circle dock from, Sourceforge was the one for me. It was really cool and below shared is a video of it.

However the immediate reason to write this post was QR Code. I knew there is a bar code scanner in ma phone but I have never used it or else I was never required to use it. However, today while I was going through few blogs I found it could be a great way to share urls and even contact details. You can read more on QR Code on, Nokia Mobilecodes. One of ma first attempt was to create a code carrying the blog url. It works tremendously well and I was able to visit the blog soon after scanning it on the phone which earlier I had to either type or to use a bookmark. Below I share the QR Code if you have a phone with bar code scanner you should be able to scan it with the camera.

Lonely Coder

Anticipating a release of fennac which is the Symbian version of Firefox. Browsing with Firefox on cellphone should be cool. Thank you. 🙂

Getting wired for the final year Project.

I’m back after a long break. Ever since, I finished ma placement I was quote up with some projects and never had time to make post. Anyway this marks the start of another huge project in ma undergraduate studies. Yes, this is all bout getting wired for ma final year project.

The Project falls into the main stream of HCI (Human Computer Interaction) which will also involve a fair bit of wireless communication and motion sensing. But the first part of the project is to control a PC with hand and to provide support for all desktop applications.

The idea is to use a web cam and track hand movements and then define various methods for simulating all possible mouse events with a set of hand gestures. And going a step further, it is also planned to provide a drawing pad kind of an application where the user can draw various symbols and directly execute keyboard shortcuts without having to press any key (or key combination) on the keyboard.

So for the first part it will involve a lot of image processing and I’ll be using OpenCV for it. I chose OpenCV because it is open source and provides ample support for motion tracking. And since it’s C/C++ based it’s easy for me to get started with it as well.

I initially wanted to setup Visual Studio (2008) and configure OpenCV on it. But I failed badly on my Vista. Though it got installed alright, I couldn’t initiate a c++ project owing to a problem in launching the wizard for it. Anyway this was a known issue and was caused due to a permission issue with one of the registry keys associated with Visual Studio.

After a bit of digging I found a nice light weight open source IDE which also supports C/C++ development. After mapping it with the compiler(MinGW) and pointing OpenCV libraries I was able to code ma hello world in a flash.

The IDE now I’m using is Dev C++ and works wonderfully well with MinGW. If you are interested you can follow this tutorial which I also followed,
http://www.cypax.net/tutorials/opencv/index?language=en

And if you are using the latest version of OpenCV make sure you don’t include -lcvcam to the linker command line. And the tutorial assumes that you have already setup MinGW if that’s not the case you may visit,
http://mingw.org/

Once you finish installing MinGW, you will also require to add MinGW bin to your path variable. Hope this will be useful if you are a windows vista user wanting to kick start with OpenCV image processing library.

After playing around with some tutorials and samples code I was able detect a moving object and bind the mouse pointer to the moving object but this looks very unstable at the moment. 🙂

Above I have used color space conversion, Contours finding and Edge Detection. And now I’m working on template matching. Hope when it’s combined with Template Matching it can produce better results. And make it a lot stable. Below I also share a screen shot of template matching (performed on an image). I’m yet to apply it on a video. 🙂

Template Matching via OpenCV

Template Matching with OpenCV

SLAX. Linux on a USB flash drive.

As things have turned out this happens to be the first post for this year. Though I wanted to blog a lot, ma work doesn’t seem to be giving me any room to do so. Anyway, Since of late I really wanted to try out a Linux Distro either in an emulated mode or to have it on a USB drive.

First I tried to run it in an emulated mode by following some of the tutorials given on PenDrive Linux. But after a series of failure I decided to change to ma second option. When it comes to Portable distributions two famous one’s that came to ma mind were Puppy Linux and SLAX. And they both have KDE.

After considering some of the capabilities/features of both Puppy Linux and SLAX, I decided to stick with SLAX because it could offer me most of the software that I was looking for and moreover, you don’t need to install any extra plug-ins to get your MP3’s and other commonly used video formats (specially avi) working. This is something I would really like to have on other distros like Ubuntu and which I unfortunately, don’t find on them due to certain restrictions (I think it’s better for me to stay out of this coz then I will be getting into patent and copyright laws and put ma self in a spot of bother).

You can find more about SLAX on, slax.org. And since, I’m using a hp pavilion dv2000 which has Windows Vista installed on it, this post should ideally suite vista users because it’s bit different than setting up your boot stick from being on other (older) versions of windows. But actually, creating it on older versions of windows seems to be lot easier than on Vista.

But to start with I should admit that there are some pre-requisites to ensure you can boot into SLAX using a pen drive. Because not all the PCs and Laptops supports booting from a USB drive. below I list few pre-requisites.

  • The PC or Laptop that you are using should support booting from a USB drive.
  • A pen drive with a minimum of 256 MB free space.

Moving on with the configurations,

  1. download SLAX usb edition (you will be downloading tar ball)
  2. download 7-Zip. (to extract the contents of the tar ball)
  3. extract the contents of the tar archive to the root of the pen drive.(boot and slax)
  4. download syslinux-3.xx.zip and extract it to your local file system
  5. copy the contents of syslinux-3.7.2/win32 folder to boot/syslinux on the pen drive.
  6. Now click on your windows start menu, type ‘command’ on the search box of the start menu.
  7. Once you are shown command prompt in the start menu right click and select run as administrator.
  8. Move the prompt to your USB drive by typing “driveLetter:” and enter.
  9. Type cd boot and press enter (in order to go to the boot dirctory in the usb drive).
  10. Type bootinst.bat to overwrite the MBR on your usb drive.

That’s it, we are done with the configurations. Now you can reboot your machine enter bios settings and then make USB drive as your first boot device in the boot sequence list. Now you should be logging into SLAX.!! below I attach a screenshot of slax while I was listening to some great tunes of A.R. Rahman.

a screenshot of slax

One of the coolest things about SLAX is that it not only shows other file systems but it also allows you to write to those which really makes life lot easier. Since SLAX is module based and modules get installed on-the-fly you never need to login and install anything. All what you need to do is just download your preferred module and copy to slax and next time you boot into slax, you should be able to use your new app, easy as that.

I really enjoy ma time on slax and I hope you will consider SLAX next time when you wanna go portable as well. Cheers!.