Wednesday, December 31, 2014

A Great Place to Work

Today was my last day at IFS. Until today morning, I didn't thought that leaving a place where you were just there for 15 months make you emotional. Though my stay at IFS is not that long I was really fond of IFS.

I get to know about IFS when I was a 2nd year student at university. It was in 2010. We had to do a project collaboration with an IT company. Through a one of the group member's contact we get a chance to go to IFS and had a discussion about a project with Dulantha aiya. We decided to do that project and got chance to visit IFS couple of times. At that time I really wanted to join IFS. But with time there were another 1 or 2 companies that changed my mind. However finally at the middle of the last year I decided to apply for IFS and got selected.

I joined IFS on 16th September 2013 just after finishing the last semester at university. We had 6 weeks of training and then I joined Technology group on November 4th. Few days before joining the group a person comes and told his name then told me that I can join Technology group. That was Mangala who was my Director. Next day when I was playing carrom a woman came and told that she want to discuss some point regarding my new assignment and she also told that she would wait until I finish my carrom game. She was Chamilka akka who was my Manager. I never expected so much humbleness and kindness from the management. That was truly fascinating. At IFS, it doesn't matter whom you talk with everyone is so humble and kind, willing to provide assistance at any point.

It is very hard to find an IT company that has work-life balance like at IFS or any IT company that pay overtime like IFS do. I can point out a long list that really bound me to that amazing culture. IFSers are really a great bunch of people that I have ever met. I really enjoyed all my work there and specially the chance that I got to be a part of organizing committee of the IFS Annual Sports Day, IFS Dinner Dance and many more events as a welfare member and also the awesome TechIgnite 2014.

Sometimes in life we have to get out of comfort zone. Leaving IFS was a very tough decision that I took in my life. Though I left IFS, those 15 months and the memories will never be fade.

Thursday, November 20, 2014

Myself and computers

I could't recall exact date that I fall in love with computers. But since I was a little kid I used to read stuffs about computers. As I remember there were some articles in Wijaya news paper which I used to bought since grade 4 ,5. There was a Tv program on Rupawahini on Mondays at 7.00 pm called "Antharjalaya obe niwahanata" I love that so much. I really wanted to try out those stuffs. But computers weren't popular that much those days. Father bought a computer for the first time when I was at grade 9. At that time Crash zone was my favorite tv show. I pretty much inspired how those kids work with computers. I wanted to be a game tester. Myself and a one of my best friend who is living next to my house used to play computer games so crazily in those ages.
 With the time I wanted to do more than just playing game. I started to play with HTML. <marquee> tag was something I was impressed so much. I wrote quite few basic html web pages at that time. I have no idea what is programming but I liked to write html stuffs.

(To be continue)

Sunday, August 31, 2014

I Dream A Lot

(Human)Life is one of the most amazing thing in the universe. People eat, drink, walk, play sleep etc.. throughout their life. I think every human on earth at least saw a one dream in their life. Not the usual dreams that we saw when we fall a sleep. But the dreams that make us motivates to do something in life. The natural thing is people have dreams and they are just a dreams.
It is very hard to find people who work to achieve or to make their dreams come true. No dream will come true automatically. Each one of us have the courage to pursuit our dreams. All dreams may never come true. But at least we should give a try.

If you are really passionate about programming (of course there are programmers who do it just for money) you may get various crazy ideas. I think that is normal. We always dreams about lot of crazy new stuffs. Some of my crazy ideas are
1. Build a system like in Person of Interest
2. Build an AI like Virgil (Crash Zone)
3. Develop a new programming language

First and second dreams are closely related with AI, image processing, computer vision like stuffs. But when it comes to the third point it is like how to think out of the box. There exist thousands of programming languages which various people have developed for various purposes. Java, C#, VB, PASCAL, PHP etc... most of the languages are designed with some specific requirements.

[Under construction]

Thursday, January 9, 2014

Face Detection With JavaCV

For those who have waited for latest Person of Interest it's been telecast. Backup of project Samaritan has been stolen.
Lets get started. As I mentioned in earlier post after watching the latest episode, again my head bumped up with that crazy idea "The Machine" Up to now I have tried to capture a single image from web cam then I step up and capture a video. Now I think it is time to get touch with some rel image processing stuffs. The thing that I'm going to try today can be seen in most of capturing stuffs today. Face detection. It is in digital cameras, smart phones and even facebook now days having some awesome face detection algorithm where when you upload a photo it suggest the person to tag with great accuracy. Above all The Machine is heavily using face detection."It sees everything"

First let's try to detect a face in a photo.
You may think that code is just few lines and this is so easy. Yes that is true if you only want to touch stuffs that are being already built. You will never explorer new stuffs if you stick to just to them.
Computer can see via a capturing device, but it never understand what it seeing until we teach it what it see. If you like this google and read on Computer vision. It is where people are trying to teach computer how to behave like a human eye. This teaching process is not so easy. It is called Machine Learning. There are various ways that are been developed by geeks throughout the last couple of decades. Mainly these learning techniques can be categorized to 3 broad areas.

  1. Supervised Learning - This is similar to parents taught us when we were small and we by hard them. (You are having labeled data set and learn  based on that)
  2. Unsupervised Learning - In this method we don't have labeled data.
  3. Reinforcement Learning - When parents scold or beat us we know it is bad. If they appreciate we know it is good.
This is a so much interesting subject area if you like to dig it in. You can find lot of books in this area.
  • Artificial Neural Network
  • Decision Trees
  • Bayesian Networks
  • Hidden Markov Models
  • Support Vector Machines

are some of the commonly used techniques in Machine learning. Lot of people hate mathematics stuffs when it comes to computing. Most of the people think that there is no need of having knowledge about mathematics to do programming. Yes you can survive even at the industry, but if you really like advanced stuffs it is a must to have a good mathematical knowledge. All most all the machine learning techniques used mathematical formulas, integration, differentiation, etc...  It is enough about machine learning and advice. Let get back on to track.

Create a new java class and have following code in that


 class FaceDetection {  
   private static final String CASCADE_FILE = "F:/opencv/sources/data/haarcascades/haarcascade_frontalface_alt.xml";  
   public static void main(String[] args) {  
     IplImage originalImage = cvLoadImage("E:/Images/Faces/Image1275.jpg", 1);  // Specify and image which has at least a single face
     IplImage grayImage = IplImage.create(originalImage.width(),  
         originalImage.height(), IPL_DEPTH_8U, 1);  
     cvCvtColor(originalImage, grayImage, CV_BGR2GRAY);  
     CvMemStorage storage = CvMemStorage.create();  
     CvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad(CASCADE_FILE));  
     CvSeq faces = cvHaarDetectObjects(grayImage, cascade, storage, 1.1, 1, 0);  
     for (int i = 0; i < faces.total(); i++) {  
       CvRect r = new CvRect(cvGetSeqElem(faces, i));  
       cvRectangle(originalImage, cvPoint(r.x(), r.y()), cvPoint(r.x() + r.width(), r.y() + r.height()), CvScalar.BLUE, 5, CV_AA, 0);  
     }  
     cvSaveImage("E:/JavaCV/FaceDetection.jpg", originalImage);  // saved image with detected face(s)
   }  
 }  

Here CASCADE_FILE is the data file that we used to learn the machine to identify the faces. This file can be find in the OpenCV zip file that you have downloaded. I'm not going to talk about what is in it in this post. But you can see lot of numeric values in that if you open that xml file.

Now run this file (You must include javacpp.jar, javacv.jar, opencv....jar) and see the output image file