How to setup CodeBlocks for OpenCV programs



In this tutorial i will be using OpenCV v2.0 and Code Blocks v10.05 with GNU compiler on Windows 7 operating system. Using OpenCV v2.2? Then you can check this post "Setup OpenCV 2.2 in codeblocks"


To work on OpenCV with Code Blocks you just need to add some libraries. Following are some simple steps that I followed.

  1. First of all i assume you have downloaded the OpenCV package and installed in your system. ( Not exactly install, just extract ) If not you can Download it from here. 
  2. Make sure the environment variable PATH is set. This could be done during the installation procedure itself. It will prompt you with this question. If you missed that then you have to manually add it. 
  3. Considering you have the OpenCV installed in your C drive, I continue with the method.
  4. Open Code Blocks.
  5. Goto menu Settings > Compiler and Debugger > Search Directories
  6.  There goto Add and add the directory C:\OpenCV2.0\include\opencv

Softwares, codecs and themes for Ubuntu

This post is for all those Ubuntu beginners ( not necessarily! ) who are currently bored by the default themes and its non ability to play media files. Sadly yes, you cannot play a media file in ubuntu as it is. Even a mp3 file wouldn't play. This might be because of various reasons, but ubuntu doesn't restrict you from installing codecs that can handle these media files.

So the good news is, there are codecs for Ubuntu that can make your system play files that wouldn't run in other operating systems! Some of the weird extensions which wouldn't run in windows with vlc and  K-lite codec ( which i think are the best players for windows ) ran fine in Ubuntu. OK  so to install the codec's just click the below link.




For more themes click on the below link. It will install you all the themes from the community package.


You can also download theme. Usually it will be a .tar.gz file. Just goto 
System --> Preference --> Appearence
There you have an option ti install themes. Just browse for the theme location and install.

There is a very nice tutorial to install Mac theme for Ubuntu by MakeTechEasier. Seems to work pretty well!


I would also suggest you to install Cairo Dock which can totally change your desktop looks. Its one of the most impressive open source software's I have seen (though there are some bugs here and there!!) and is worth a try! Just type the below code in your Konsole.
sudo apt-get install cairo-dock

Or you can visit their site Cairo Dock and install directly.


How To install tomcat6 sever in Linux in Ubuntu

In my vacation last month i was assigned a project. The project was about bug fixing in a web application. So i had to install some of the basic tools - server, jdk and some others. I chose tomcat6 as my server and went on to install. This post is basically for the beginners. So i am going to keep it very simple.

The one simple method available for Ubuntu users is installing through the Synaptic Packet Manager. 
You can find this tool at  System > Admistration.



Searching for tomcat you will see something like the above screenshot. Just right click on the main tomcat6 and mark for installation. Then click on Apply to install. 

To start the server type the following command in the terminal.
sudo service tomcat6 start

Now goto your browser and type http://localhost:8080/. You will see a message like "It Works" if the tomcat is up and running. 


The problem i found with this type of installation was finding the server directory. When installing through synaptic the application files are distributed in various folder. If the library files are in /var/lib/tomcat directory config files will be put in /usr folder. This becomes a problem you want to connect tomcat to eclipse. The solution to this is the manual install of tomcat!

First download the tar.gz binary distribution file from http://tomcat.apache.org/. Next follows some simple commands to be executed to setup tomcat.
  1. Move the tar.gz file to /usr/local/src and extract it. You can either simply right click the file and click on extract or type the following commands in the terminal.
tar xzvf file_name.tar.gz
or
tar xjvf file_name.tar.bz2

    2.   Now you have to setup the environmental variables. Use the following commands.


cat >> ~/.bashrc
export CATALINA_HOME=/usr/local/src/tomcat6
export JAVA_HOME=/usr/lib/jvm/java-6-sun
Press ctrl+d to save and then 
source ~/.bashrc
Now to start/shutdown the server goto the terminal and type
sudo $CATALINA_HOME/bin/startup.sh
sudo $CATALINA_HOME/bin/shutdown.sh
So using the manual method of installation you can now have all the files of  tomcat in a single directory making things simpler.

A day out on bikes : Kudlu Thirtha

OK. now don't get confused. This is still the same old "open-source supporting" blog. But i just thought of adding some personal posts into it. I would be including some very interesting things happening to me in daily life.. =)

Let me now start briefing about this post. Last week i had an awesome experience driving to a location 60km from Manipal. Click here to know the exact location. It all started when me and my 2 cousins Abhiman and Krishna met at a function. It was a coincidence that all 3 of us were on vacations and all were in mood for some adventure!

Krishna is the pro biker and has covered almost all places in a radius of 200km around i can say :p  He suggested the falls "Kudlu Thirtha". Abhiman who had just finished his intern ( @ Reliance :O) got pretty excited and agreed for it. Even i was OK. So we all decided to leave for this place the next day that was July 27th.

So the next day, we all reached the starting location and were all set to go. The day was surprisingly bright ( was raining heavily from past 2 days!! ) So Krishna, the over optimist didn't get his jacket.. We all set off at around 12am.


The roads were awesome! (Its the same way to Shimoga through Agumbe Ghat ) It reminded me of the NFS MostWanted tracks and like we were in a pursuit ;) My bro was always leading me as i had no chance overtaking his mighty 150cc CBZ bike with my 100cc Platina :P

Soon as we crossed Hebri ( which is 30km from Manipal ) we happened to get some very beautiful farmlands and high hills. And guess what..? We started clicking snaps!! Though none of us had an actual camera we tried our best with the 2MP cellphone cams :P




Everything was going fine until we took a deviation from the main road and entered a dense forest. Rain had to come sometime and it thought this was the right time! We stopped to get our jackets on. Though we had a very nice tree for cover we decided to move cause we were behind schedule. Krishna zoomed off with his BEAST before i even started my bike. And when i tried starting it, it wouldn't start!! There i was in the dark jungle with heavy rain ALL ALONE! I couldn't stop cursing my bike as it never started even after some 100 kicks! No network connection made me leave with only one option... WAIT FOR KRISHNA AND ABI.. ( Who were taking extremely long time to return which left me freaking! :P ) After a 5-10min wait i was able to see them coming back. God it was such a relief!! And then my "Pro biker cousin" Krishna starts the bike in just 2 kicks!! I just couldn't believe it.. It was like the bike was waiting for it to be started by the pro biker :p

After that incident we didn't stop for a while as we both didn't want such an event to happen again :d The rains had done one good thing. Fill the mountain valleys with beauty! It was greenery everywhere and we couldn't resist taking some more snaps.

This masterpiece by Abhiman

Thats me..

Mind you.. 2MP cam :)

Abhiman
The "PRO BIKER" Krishna.. ;)

Next we had a quick drive to reach the spot from where we had to take a route meant only for the bikers. At this time no 4 wheelers can goto the falls as the road leading to it is heavily flooded by River Sita. So we had to take a narrow bridge to reach the other side.


After this it was a complete rally track with all slippery roads, deep curves, ups and downs reminding me again of the NFS ;)

Slippery road made my bike slip backwards down the slopes!
Finally we were through the dense jungle to reach the spot. Seems people over there steal petrol from your bike. So we had to find some safe place to keep our bikes. Luckily we found a house who let us in :) The guy also helped us with an umbrella and a "thing" that could help us fight the LEACHES!! "The thing" is some mixture wrapped in a cloth. He also gave us a bad news.. that the way to the falls is blocked because of the heavy flood waters! :(  Now that was a  big twist in the tale for us!

But Krishna didn't want to leave just like that. So we went on to try to reach as close to the falls. A few more snaps coming up.



Yea rite.. this was the short cut ;) The slippery do or die wood log :P
Next our encounter with the LEACHES!! We were going through the forest when i first noticed some black creepy slimy thing crawling on my feet. It took me some time to realize it the "BLOOD SUCKER LEACH". Yes it actually sucks your blood and you will have no clue until its done. And its very difficult to get it off! Thanks to "The thing" which was given to us by the local guy, it saved our a*****! :D

Thats the crawling vampire...!
We proceeded and finally reached a spot which was the closest we could get to the falls. We had some snacks. And then came more photo sessions!





 

Ya its a very bad idea to wear such slippers on such trips ;)
Finally it was time for us to return. We were glad to the fellow who let us keep our bikes in his house. The guy was so simple that he even refused the money we offered. The only thing left now was our return journey and we were hoping to enjoy it to the best!

3 in 1? :)


We managed to capture some really awesome scenes on way back. We didn't even bother to get on our jackets. Really we were enjoying the drive in rain. Awesome experience!!




Way into the JUNGLE :)

So after 6-7hrs of tough driving, untill we reached my aunts place at parkala. We had some serious racing in between which was obviously won by the "Pro biker"!! :P It was an amazing experience. A must go destination for all the nature lovers. Also bikers will love the tracks! But i would suggest you not to go in the rainy season. The falls will still be alive in the later parts of the year. So sometime right after the rainy season will be perfect! Ok that's about our journey. That definitely made my vacations!! ;)

0 A.D


O A.D is a free, open source, cross platform, Real-time Strategy (RTS) game. Its about the ancient warfare and is the open source clone of Age Of Empires!

From the Wildfire games official site we can find that its a historical-based war/economy game that allows the players to relive or rewrite the western civilizations between 500BC to 500AD. 


A group of enthusiastic game developers have developed this game. High detailed artwork, state of art 3D graphics, good sound quality and flexibility are some of its features. It has multi player option too.






System requirements : 1GHz CPU, modern graphics card (GeForce 3 at minimum), 512 MB RAM
It has support for Windows 2000 and above, Linux and Mac OS X.


Download

In Ubuntu or any other Linux distro you can install 0AD just by running the following command

sudo apt-get install 0ad

Are you a programmer and want to get involved in game development then you have the oppurtunity here Get Involved

Category: 0 comments

How to improve your Ubuntu Lucid Lynx boot speed


Yes, even with a faster boot speed in the new Ubuntu Lucid Lynx 10.04 people are finding new methods to further speed it up! :) I tried the following tip and it does prove to speed up Lucid.


Its a very simple tip and uses profiling i.e use a profile during boot. OK let me brief the method in 4 simple steps.

1. Open console/terminal. First you have to open the grub file. You do it by     typing.
sudo gedit /etc/default/grub

Enter the password  and proceed to open the file.



2. You will find the some commands like these.

    GRUB_DEFAULT=8
    #GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=" vga=792"

 In the 6th line i.e GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" add profile.
 So it will become GRUB_CMDLINE_LINUX_DEFAULT="quiet splash profile"
 In some cases splash might not be there. Just make it "quite profile". Save and close.

3. After that come back to back to your terminal and execute a grub update. Then reboot system.


sudo update-grub2
sudo reboot

4. Now again goto the grub file and remove the profile keyword which you had inserted previously.
    Update your grub using the above command and reboot.

How To remove unwanted Kernel entries from the Grub

Ubuntu Lucid Lynx now comes with version 2 of the grub. One of the annoying things with Ubuntu's update is the frequent Kernel update's. And every time there is a kernel update there appears a bunch of entries in your grub. So this post is basically going to help you get rid unwanted entries in the grub in a simple way.

Not much to do actually. Its a very simple 2 step process. There are many grub menu edit methods using which you can just edit the grub. But what i have here is completely deleting the older kernel from your system. 




So if you consider the above image, kernel 2.6.32-22 is the latest version in the system. If there are only 2 version of kernel in your system then you might want to keep the previous version as a backup. 

Basically if your deleting then you start by typing the command

 sudo apt-get purge linux-image-2.6.32-21-generic

If you have multiple kernels to be deleted then repeat the above step.
Next you have to update your grub. This is done by the simple command..

sudo apt-get upgrade grub

Now restart and you see your grub is all cleaned up! :)



NEXUIZ


Nexuiz is a open-source first person shooting game! Now isn't that exciting? An action game for free :P. Usually open-source games are not up to the the gamers expectations. They usually lack in the graphics quality due to the lack of proper support. But Nexuiz proves it wrong!

 Check the official video of the Nexuiz.


This game is something similar to Unreal tournament, a 3D death match game. Gameplay is interesting and challenging. Graphics details are handled pretty well. There are different game modes which could be chosen by the player; CTF deathmatch, domination and of course, single player campaigns  which will lead player to survive 20 levels of chaos! It actly takes nothing to try this game! Its around 800MB. Just download and play! :)



Nexuiz runs in almost all platforms: Windows, Linux and OSX. Requirements are pretty basic. You got 512MB RAM and an OS above Win 2000 (In case of Windows) it will work.

Download

Lego'd it!

IPad and IPhone Lego's
Category: 0 comments

Code::Blocks

Code::Blocks is a free and open source cross platform IDE. Its very simple and is best suited for beginners. Currently code blocks is being developed for Windows, Linux and Mac OSX. If you are a windows 7 user, code blocks is the best way to run your c/c++ programs! Turbo C (using the DOSBOX) and Dev C++ are some of the alternatives, but Code blocks beats both of them with its good looking interface and simplicity.

Some of the other features of Code Blocks are
  • It can be extended using a plug-in i.e any kind of functionality can be added just by installing/coding a plug-in. For mode info on plug-in's click here
  • Although Code Blocks is designed for C++ language, there is some support for compilers of other languages also. GCC (MingW / GNU GCC), MSVC++, Digital Mars. Borland C++ 5.5, Open Watcom and more.





 Download

Setting up Code::Block for your First C/C++ program setup : Tutorial by Cprogramming.com

SLYNUX


This is a very interesting piece of software not only because of its exciting features but also because its developed by a 15yr old teenager! Yes you read it right.. Just 15yrs old.. and that's Sarath Lakshman from Kerala, India. Here's an article on him in The Hindu.
He seems to have modified the Knoppix to get this kind of user friendly operating system. "User-friendly" is the right word for describing this operating system because of its Windows operating system look and layout. All of them know Windows, so to make it easier for Linux beginner's Sarath used similar UI. Those were his intentions when he started with this project- help familiarize Linux to the beginners.

Some of the features in short...
  • Can run on CD without any installation.. that is the Live CD feature
  • Its takes up 2gb after complete installation where you have loads of applications
  • Comes with Malayalam font!
  • Has good driver support for almost all kinds of modem, digital camera's and printers.
  • Detects all Windows file system's.
  • Wide variety of application support for multimedia playback, web browsing, image editing and office tasks.

Download

SLYNUX

Now that's a big revolution :)

Category: 0 comments

How to run php in Windows - WAMP server

To run php programs we mainly require
Apache server
MySQL
PHP
Ok now don't worry, you don't have to install all these. In this guide we use the Wamp server which basically includes all these. You can download it from the below link.


Download
WAMP server

Install it in your Windows machine. Just follow the instructions. Its a simple installation procedure.

After installation, run the server...
Click on START, and then start WAMP server to get your server start running. You will see the WAMP server icon in the taskbar if its running.


The default installation directory of WAMP is "C:/wamp"
C:/wamp/www is the base directory for all your projects.
In the directory "C:/wamp/www" create a directory (eg : myprog)


In this directory now create the php file which you want to execute.
Open a notepad, type in the program and save it with .php extension.

Get sample php scripts from here







Now click on the WAMP server icon in the right side of your taskbar.

Click on Localhost.
WAMP server Homepage will now pop out and you will be able to see your project list.

Click on the directory created before (eg: myprog) You should now be able to browse through all the programs in that directory.



Click on the php program to execute. DONE!!

Now wasn't that so simple! :)

Ubuntu 10.04 Lucid Lynx


The new version of Ubuntu, Lucid Lynx 10.04 got released on April 29th. I was glad to see quite a few improvements in it.The last time i had installed Ubuntu was the older version Karmic Koala, the 9.10 version. It seemed to had a lot of bugs and i was very disappointed as i was quite a fan of Ubuntu 9.04. But 10.04 seems to give the impression that its going to be better than 9.04!




Let me just outline some of the exciting new features of Lucid.
First of all the boot up. Ubuntu had never been this fast! In a normal machine it could load within 15-20 seconds. Ubuntu is really obsessed with improving the boot time!

Ubuntu have come up with a unique way to attract users! Every ubuntu user gets 2gb of free CLOUD SPACE!! Also there is Ubuntu One Music store which can sync with your cloud space. Now isn't that cool??!

The new Ubuntu seems to provide good driver support. I must say this is the only Linux distro supporting my laptop (with the new Core i3 processor) right now. Drivers for my display and the audio got installed automatically. Only the Broadcom driver for wireless internet connectivity was missing which i easily installed through the "Hardware driver" tool. Its an inbuilt tool that searches for all the drivers that are compatible with your hardware.

Lucid also seems to bring some relief among social networking addicts! Gwibber, a social client that comes along with Lucid can keep track of all your microblogging and stuffs.

Now to the downside of Lucid. I have been using Lucid for about 2 weeks now and have had 2 crashes already. Lucid still needs to be worked on its stability. As far as the bug mentioned in the Phoronix, doesnt seem to cause problem to me anyway!


Relaunch!

It's been almost a year now i have been running this open source blog, and it has received a pretty good response. I must say a lot of people are turning to open source ( guess they got bored cracking the non open source ones! )

Today i want to relaunch this blog not only as a software download blog but also as an informative one. I will be posting all the stuffs which i feel are interesting, useful and cool.. :)
Basically it will be all techie stuffs.. On Linux (especially ubuntu), Windows 7 and a few tips n tricks. Also planning to include a personal section in which i want to share some thoughts.


I officially announce the relaunch and i hope my new posts interests you! :) Blog name is retained and I would still continue posting newer open source software's.
Category: 0 comments