Thursday, October 29, 2009

Week 5 Day 4

Today I finally get started on the Hollow Touch project, and cameras, tripods were setup.  Programming will now be on Macintosh, using C++, and our first assignment will be to set up a program capable of identifying different fingers on our hand.

This assignment will involve wearing a gloves with different colors for fingertips, middle bone of the fingers to allow the detection of fingers.  However, I am still fascinated on how Microsoft is able to detect our bones and use it in project Natal. Through this project, I am sure that many boundless potential and possibilities will be unleashed, and the future of hologram will no longer be a far-away idea.

So here I am, creating another similar technology called Hollow Touch, unleashing potential and changing the future of Stereo and 3D entertainment

Wednesday, October 28, 2009

Week 5 Day 3

Today I spend much of the day improving the application to make it more user friendly and more easier to use. However, I have also realized that the application may not be able to run on Windows Xp, Vista, or any version lower than Windows 7, unless .netframework 3.5 is downloaded and installed

Feeling sick today, will stop here to take a rest. More details tomorrow : )

Tuesday, October 27, 2009

Week 5 Day 2

Great day today, finished fixing some bugs and improved certain features that makes the UI more better and user friendly

Monday, October 26, 2009

Week 5 Day 1

The start of Week 5 saw me working on the last bit of XML writer for Lightdraw before embarking on the Hollow Touch project. I have now been more familar with C++ and have more understanding on its potential.

Friday, October 23, 2009

Week 4 Day 5

Time passes, and it is now one full month that I have been in IHPC. Thinking of it as a whole, I have learnt about Linux. its distribution, the core of Lightdraw, programming in Linux, and programming in C++.

I have also gradually learn to pace myself to cater to the workload given, and learn more on the importance of punctuality, as well as personal dynamics in the workplace

Reflection for this week :
This entire week I have been continuing and completing the work given to us last week, and we are glad that we had managed to finish it on the date we stated. I have learned on the use of arraylists and vector in C++, the customizing of the panel class, as well as FileIO and XML reading.

Though I have learned xml reading and writing in school, however the approach used in C++ is completely different. I am also glad that I have managed to control some of my busiest day this week, and didn`t mess up things, which I am gald of. However there is more to learn, and I am glad this learning opportunity have been given to me

Thursday, October 22, 2009

Wek 4 Day 4

Finished up with the data integration, and data are now saved to vector upon immediate change. Gald that we are left with the last part, XML writing

Wednesday, October 21, 2009

Week 4 Day 3

Finally begin on the last part of development, data integration for various forms and XML file saving. Today was an exciting day as the release of Windws 7 is just 24 hours from today. Finally, Windows 7 is going to be released to the public, and to laptops and computers sold around the world.

Its great to see how Windows 7 will bring joy, excitment and efficiency to families, businesses and normal users like us, and also, how it brings out our potential to the fullest.

With great anticipation, I will be looking forward to Windows 7 Launch Tomorrow

Tuesday, October 20, 2009

Day 2 Week 4

Today was the most enjoyable day of the week! Finally found the solution to my coding problem yesterday regarding casting, and everything worked well since. I have since completed 70% of my GUI portion, and just more to go,before I will finally code up the data management portion

Monday, October 19, 2009

Week 4 Day 1

Today's morning was spend on discussing about the GUI and XML loading and writing, and the way it should be programmed, and my progress on the project heightened with the finishing of the InteractionPanelList and InteractionPanel class.

However, there will still be more to do, such as testing, integration with my colleague's code and improvements to the existing code structure to make it suitable for distributing

Week 3 Day 5

Cried out TGIF once I got off from bed today, glad its finally Friday!

Today was spend on continuing on programming the GUI. Succeeded in adding in buttons and textboxes programmically, and realised something:

To set the location of a control (textbox or button), we must assign a Point object to the Location property of that control. Doing textbox1.Location.X::set(2) will not work. It took me a few tries to realise this.

I was also thankful today as a C++ MVP answered some of my programming problems with references and pointers in the msdn forums. He was so detailed that he even taught me step by step how to solve it, and I was so glad that it worked.

Reflection of the week :

This week saw the end of my previous week project and the start of programming a GUI application in Windows 7, Visual Studio. Although I am familar with the drag and drop, and certain features of CLR, such as the Control class and the Form class, I am still unable to complete an application in a short time due to the language differences.

Each language is unique, and although CLR makes it simpler, and Visual Studio makes coding more enjoyable, it is the core of the language that we must know in order to allow us to finish a great project in that particular language.

Thursday, October 15, 2009

Week 3 Day 4

Today was still about coding on the GUI xml writer. I have came to realise how lucky I was in the old days where I was coding Windows Applications in C#. In C++, many things are not specially catered to help in easier coding, unlike in C#, where everything is made easier for everyone.

However, although coding in C++ is not simple and easy, it has allowed me to specialise in an additional language that I otherwise, would not have any opportunity to learn

Wednesday, October 14, 2009

Week 3 Day 3 @ IHPC

Today we have finished up on XMLReader, and started coding an XML writer. When I heard I was going to be coding in Windows and Visual Studio, sheer excitment rings in my head!

Missed coding in Visual Studio after a few weeks of coding in Linux, and of course missed Windows 7 also.

Not feeling well today, and I guess this will be my post for the day, will post more things tomorrow : D

Tuesday, October 13, 2009

Week 3 Day 2

Yep, today we continued from yesterday's assignment, and I found out that TinyXML libraries cannot work. As such, I switched on to LibXML (xml parsing), and things went on smoothly. Today not only did I learn about steps to take in trouble shooting libraries or codings in C++, I also learned about how spaces or new lines can interfere with XML parsers, and how to bypass them.

Basically the bypass can be done through a while loop (indefinite loop as we do not know how many new lines or space we have), and followed by a code to assign the next node into the current node variable. This simple code will help to bypass spaces and newlines

Monday, October 12, 2009

Start of Week 3!!

Time passes, and it is the 3rd week (3/4 month) I am working at IHPC, and I can feel I am slowly adapting to the working world environment.

Today we started on our project of XML parsing (reading and writing). One of my learning points today was compatibility across platforms. C#, Java and Visual Basic, unfortunately, are under the .NET framework and therefore are not cross-platfrom compatible, unless you were to install a special application on Linux and Mac (called Mono). The language that I learn and know to be cross platform is Flash and Actionscript.

Indeed, in the business world, although many things are made cross-platform through an application (eg. Mono), but more of the focus is on allowing the application to be cross platfrom without requiring the user to install additional software

Thursday, October 8, 2009

Week 2 Day 5

Today most of the time was spent on implementing new features, such as text showing the ID of the laser, and also some bug fix to the existing application( previously it recognize the new laser's ID as one more than its actual ID when 2 laser beams are shown.

It was due to the fact that my existing vector had actually stored lasers that are alive and not alive, and the coordinates vector only stored lasers that are alive. It was resolved by declaring another vector to store only the ID of lasers that are alive

Another thing I learned would be string concatenation in C++. While in C# and Java we could just use string s = "id : " + idNum; In C++ this will not work. We have to use an Osstring to store the entire concatenated string, and then convert it to a char array(char string) type.

Reflection of the week :

Time flies and its the end of my 2nd week at IHPC. I have learned deeper into svn, open cv, and programming with cameras and lasers, which I had never done before in my polytechnic education.

This week was interesting as we touch on programming, and learned more on C++. All along I have heard C++ is a powerful language used to program games, applications, and even Operating Systems, and only when programming using it, I realise it is indeed true.

This week also had me learning more about time management as I have to rush over to Microsoft and discuss events at 6.30pm, while managing my work in IHPC. Time was indeed a bit tight for me, but nevertheless, I struggled a bit, managed to made it.

Indeed in the working world, time will be tight, and the temptation to procrastinate would be great. Adam Khoo once said," Procrastination is the ultimate killer of success", yet in some aspects of my life, I am still procrastinating on.

Indeed next week time will be tight as I will need to take care of 2 events next week, and also quite alot of work at IHPC

Week 2 Day 4

Continuing from yesterday's codes, today's morning and afternoon were left with finishing up the "X over laser" application, and solving some syntax errors after finishing the codes.

However, when we try out the finished application, it start to draw many crosses, even though no lasers were shown, and the position of the lasers being drawn are critically weird. As the Lightdraw application is suppose to return only a range of x and y coordinates between 0-1 in range, the application appears to retrieve data of 1,000 and above. The mysterious point was that we put a code to display an output to console whenever a packet is being received, and this allows us to see that no packet was actually received when no laser is shone, and this points me to the question : where does all the weird values comes from?

One answer from my internet research would be they are uninitialized values.

With the help of Ming Hong, we used a Vector instead to store the data received, and it worked perfectly well, with no weird values received. I also found out that I was all along using the wrong way to pass an array or object into a method.

The correct was actually :
passInArray (& myArray);

and not :

passInArray (myArray);

Furthermore, I have also came to know how to use Vector today

Time flies, and tomorrow would be the end of my 2nd week in IHPC, and yet it feels so much like my first day at IHPC. The amount of data (opps, I mean knowledge) I gained is definitely more than what any of my subjects would have covered, and I am gald that I am given this opportunity to have this internship at IHPC

Wednesday, October 7, 2009

Week 2 Day 3

Today we were tasked with creating an application that would mark an "X" over the spot of the laser used in lightdraw, and modifying the application that I did yesterday, I have managed to create the "X" mark over the laser spot

While moving the algorithm to the actual lightdraw application, I manage to see and play with the source code of LightDraw. The entire code for Lightdraw was quite complex, and fortunately thanks to Ming Hong's help in explaining about some parts of the code, I was able to understand and thus discover about some syntax that I have never seen before.

After some trials, the algorithm worked, however it only manage to show only one cross (for only 1 laser pointer) now. Besides, the cross also would not disappear even after the laser pointer is no longer shining on the surface. Ming Hong guide us about this, and we would need to make use of the "alive" messages in order to solve this.

Overall, today have been an exciting day working with codes and laser pointers, and learning more into how LightDraw was developed

Tuesday, October 6, 2009

Week 2 Day 2

Today was one of the most interesting day of all my programming days.


For first, I have managed to code up a C++ application that displays what the video camera see.


Next, simply just 2 lines of codes were added to include a "press c to capture" function. For these 2 features, I realise there wasn`t much coding that needs to be done. All the methods to do up these features were provided by OpenCV libraries, and all I need to do was to code up the while loop (to loop the capturing of image), and some variables.


As according to tradition, I captured an image of my SIP-team mate, victor, doing coding, which I believe would be the first few photos in this pictureless blog so far.









After lunch, we moved on to the last tasks which was to create a circle enclosing the area which is the brightest. I spent about an hour googling on contours and some RGB stuffs, only to find out that all that were irrelevant, and only one method, cvMinMaxLoc was needed. This method does not return objects, but it takes in memory address of 5 things, the converted single-channel (or colour) image, min(darkest) value, max(brightest) value, min(darkest) location and max(brightest) location (or spot), and write data to the variables at this memory address.

Thereafter, we used cvCircle to draw a small red circle with its centre point at the "max(brightest) location". The program worked out fine, and when we shine a laser light on a dark surface, it just feel great to see that the application is able to circle out the laser pointer's lightspot on the dark surface.

Next, we then moved on to removing the red circle when the laser pointer is not shining. First, we identified the brightness of the laser pointer's light spot on the wall, and was surprised it was the max value (255). After setting up an "if" statement to only draw the circle when the brightest spot is 255, the red circle now disappears whenever the laser pointer is not shinning, and reappears upon the laser pointer begin shone on the wall.

Monday, October 5, 2009

Week 2 Day 1

Today I have hands on on SVN and CVS, and even though I have used them during my major project, there were many things which I did not know in the past.

For instance the creation of repository, and the importing of files into it. During my major project days, we used assembla.com 's repository. Assembla created a repository for us when we create an account, and as such most of the time we used svn and cvs were regarding commiting, updating or reverting. The friendly tortoise client did the command line commands for us, so much so that we don`t even notice what goes on behind it.

To first create a repository, a directory will need to be created in either svn/ or srv/svn/. Thereafter, permission and rights will need to be set using the chown command, and chmod command. After they are granted, a console command, svnadmin create will need to be entered to create an entry in the repository of the current system, and lastly, users will need to be added in to the 's password configuration file. Assuming that svn and ssh has been installed and started, we can now import in files using svn file:///

During the next half of the day, time was spending on re-installing Fedora, and reconfigurating it to prepare for our actual work. The problems re-occurred reminded me of my first experience with them, and I was able to solve them more faster than when I initially faced them. However and unfortunately, due to a lack of understanding of svn, alot of time was spent on tracing and trying to solve the problem than doing actual work, and soon after Kevin show us the solution, the problem was due to the simple fact of missing the simple step of setting permission.

I would certainly feel the day have been wasted by my lack of knowledge in Linux components and my forgetfulness, and certainly I would have learned and achieved more things back today if I remain calmer and thought more carefully. As such, my goal for tomorrow would be to learn at least 4 main things, and finish up on the things Ming Hong have given me

Friday, October 2, 2009

Wee1 Day 5 @ IHPC

Today I learned about what's behind the magic when we run ./configure and make / make install. Apparently, ./configure examines the system and determine if the system is suitable for installing the respective software.

In the event where the system does, ./configure would then compile a script that would compile and install the program specifically to suit the environment of the current system. Thats where we would run "make", which compiles the source codes in the installation packages into a executables. "make install" is then run to install the respective executives or libraries into the system.

In the afternoon, we also learned about programming CV library. Created an application that draws rectangles and circles on a dark background. I have also found an application in the "samples" directory of OpenCV that can detect faces in photos! Thats something very cool! Imagine if we could even enhance the application to patch up pimples or eye bags in photos, would that save designer a lot of time? Apparently I looked through the source code, but am still unable to comprehend the code, but determined to learn it by Sunday, and possibly modify the application to work with larger photos (currently it can`t even run with pictures larger than 500 px by 500 px)

During the afternoon, me and Vic also watached "Pirates of the Silicon Valley", and found out various discoveries :
1) Steve Jobs set up Apple earlier than Microsoft was being set up
2) DOS was not created by Bill Gates, but bought from another programmer instead, and improved by Bill Gates
3) The starting point that result in Bill Gates prospering was his partnership with IBM
4) Both Bill Gates and Steve Jobs already came together to help each other in the past, not only just in recent times

Certainly there are many other points brought forward by the movie which could be untrue, butI would check them out over the few days and post them when I am certain they are true.

This week was the week I learned the most, as compared to any days I spent in my school. Although there were many difficulties, but with the help of Ming Hong and Kevin, I made it through, and learned many things I had never even thought before


Reflections:

Indeed life in SIP is different from life in school. No more waking up late and no more late nights out. These, even though initially I worried that I might not be used to switching over, but I am now able to. As compared to the life before, I can feel I am now more heatlhier and on schedule than before. Thus, I would consider this a great improvement to my life.

Through the first week of my SIP, I learned about Linux, its origins, its distributions, and how to install programs in it, its terminal commands. We have also learned the concept of ftp, ssh and remote desktop, and the actual use of it. Other than this, we also learned Console output and FileIO in C++. OpenCV library was one of the most fascinating libraries I have came to know. LightDraw was developed 2 years ago using the same OpenCV library I am learning about now.

In the past, I have always taught that high level programs like LightDraw were developed using new and advanced languages, such as ActionScript 2.0, and now, I am just simply fascinated it was developed just using the C programming language.......and just with OpenCV library.

This has taught me in life that we should not neglect the ability of simple things to create miracles. LightDraw was something big and extraordinary,but it was not developed using C#, not Java, not C++, but just C.

Hope everyone have a nice weekend ahead :)

Thursday, October 1, 2009

Day 4 of the first week

Yay, finally got started with C++ programming, and found that there is actually very little differences between C++ and C#, or even between other programming languages. The only differences is only the way we write it. For example, in C#, we wrote System.Out.Println("something");

In C++,its including the iostream header, followed by : cout << "something" ;

The whole code will therefore look something like this :
#include
int main()
{
cout << "something";
return 0;
}


Also with FileIO, in C++ is fairly simple :
ofstream outfile ("test.txt");
outfile << "This is the text I want to write to this file, followed by a new line character" << "\n";
outfile.close();

Yep, unbelievable, just 3 lines only!

Also learned about pointers, and that there is no ArrayList in C++ (in C#, ArrayList allow us to store, sort, remove any tye of object).

Next we moved on to OpenCV library. Unfortunately, the newly release version 2 (released just yesterday) caused many problems while installing, and eventually it took up the whole of the day. However, reading Lup Peng's blog, Open CV library seems to be able to do wonders of modifying images, and creating even special effects in them.

If only I could remote to my IHPC's computer now.....and start on discovering the magic of OpenCV...