Sunday, November 30, 2008

Week 6

Week 6  

24/11
Tested the OSC to X11 because we suspected that it might be the firewall that is preventing the OSC from sending packets. We solved the problem by disabling the firewall and we managed to do it. We play around with the new DV cam and Ming hong told us about the settings for the cam to setup for lightdraw.

We went over to the tile display room and tested the new DV cam with lightdraw using MacBookPro.
Results and Findings -
1tile - Successfully detect but there are some blind spots where the light will flicker.

4tiles - Even though the camera has been place properly. Some area could not be detected by the camera. I should say we failed for 4 tiles. 

6tiles - Only some area could be detected in the center. We failed for 6 tiles also.

Updated Kevin with the results and he suggested some camera positions that we could try capturing laser from a postion where the camera is placed at a certain angle. He also gave us other suggestions.

25/11
After confirming that it was the firewall was blocking the OSC from sending, we need to configure the firewall such that OSC can send packets to the other computer. Helped Hock a little on the port opening before switching my task. I went over to lightdraw room to test the puzzle application because we need to give a presentation to Kevin on or updated application. Always get prepared is better than not.

After the short presentation given by the 2 teams, we went down to FusionWorld to take a look on the lightdraw setup. We had discussions with Kevin on the possible solutions to the setup of lightdraw in tile display. One of our solutions was to reduce the area of capture because the application that was used in tile display did not need the whole screen. The suggested area to capture was 1.5x2 instead of 2x3. Went over to tile display room to test the remote calibration but we had problems because opencv was not installed and there was errors in the Makefile. Even though Bernard installed opencv, we still could not get the MakeFile to compile in the computer.

26/11
Bernard taught us how to change the makefile according to where the opencv is installed. After trying for several hours, we still could not get it to work. We went for lunch and had a little tour around Fusionpolis. We went to the skygardens in the building and the Student Room for interns which is at level14. After visiting the room, we were glad and happy that we get to be in level 16. 

Kevin and Ming hong came over to help us with the makefile,  we solved the error by including all the things that are needed in the makefile and it can compile. We did some testing and we realize that our port is blocked by the computer so we disable the firewall for 5 mins. We were able to send OSC packets among the 2 computers. However, there were consequences for disabling the firewall which was the computer went crazy and could not start up. Bernard help us to restart the computer by going the cluster computer room. He help us to open the ports that we need to use also.

27/11
Most of the staffs were at level 15 for retreat session, so we were left alone in our lab to do our stuffs. We did not do any anything in the morning because there was a demo in the tile display room and we were told to that the room was free in the afternoon. 
We tested all the opened ports and it took us quite some time before we got to the correct port which is 53.  We could not use the remote calibration so we tried the manual calibration but lightdraw could not work properly because the coordinates that were received were coordinates of the MacBook instead of the tiles.

28/11
Tested lightdraw and remote calibration with 2 macbook and it work fine. Ming hong found out that there are some problems with the lightdraw. After he has changed the codes, we continued testing but the frame rate was very low so the movement of the mouse is very slow. 

Reflection :
I learned how to change makefile according to the installed path, add more include paths that was needed. I also learned how 2 computers can communicate with each other, like when 2 users using the application at the same time.

Saturday, November 22, 2008

Week 5

Week 5

17/11
You hock completed the snapping for multi user puzzle in the morning. After that, we fixed some of the rotate corners problem. Finally, the multi user puzzle is working well. We carried on to the 2x3 tile display project. We brought one Macbook Pro and the logitech webcam over to the tile display room. We look around the room deciding where to put the webcam so that we can capture the whole screen. We even tried to put the webcam at the back of the room but there are too many frames and racks which block out some capture area. Our only choice to place the camera is at the front. So we started to set up the camera, we manage to capture the whole screen but the camera cannot detect the laser because the screen material allows light to pass through. Therefore, the camera could no capture the screen properly.

18/11
As the DV cam was not here yet, so we continued the 2x3 display by coding the receiver for the tile display. So when the lgithdraw is running, whenever laser is detected the coordinates will be send to the client computer which is the tile display terminal. We read the lightdraw codes trying to understand how the X11 works. Attempt to code the sender but fail.

19/11
Had a little team meeting with bernard on the tile display. We discussed the difficulties on the integration of lightdraw with tile display. We also discussed on the possible solutions to the problems that we could try. Bernard set us some tasks that for this week. For today, we need to test whether lightdraw can work on 1 tile instead of capturing all 6 as suggested by Harold. We went to back of the room and capture the tile using the webcam. After which we went to the front and hang the webcam on the lights and started the testing. Below is the results and findings for the 2 different camera positions.

Results and Findings :
Putting the camera at the back is impossible because there is glare from the projector which will block out the center of the screen and it will confuse the program becuase it detect the brightness of the glare and the laser could not be detected.

Putting the camera at the front is our solution but we need to hang the camera in the celing as there are audience standing viewing the tile. Therefore, we cannot place the camera on the ground with tripod because it will block the audience's way. Eventhough we manage to detect laser after changing some camera settings but the laser can only be detected at the center but not the whole frame. We suspect the calibration because we used manual calibration instead of auto therefore might cause the result. We also suspect is the qulity of the camera because we used webcam instead of the DV cam therefore the setting could not be set to our requirements. However, we will test again using the DV cam on Monday because it will be here on Monday. Below is the result of the debugging when the camera is place at the front.











20/11
We started the day by doing writing the application to receive the coordinates from lightdraw. We failed in writing the application. We continued the day by doing some testing and checking the puzzle because Cheng Teng told us that they will be using the puzzle app for tommorrow event where the staffs will bring their kids to the office and we will show them our app. From the exprience of the last demo, we decided to do testing and checking ensuring that everything is working properly before using the app on the actual day.
We actually found bugs in our program, I will use diagram to explain the bugs found.

Above is a simple illustration of one of the bug found. If the user try to snap the pieces together but the overall piece after snap will over shot the canvas which is the red part. Result of the above bug is the program will CRASH.

At the end of the day , we manage to solve the bug that is found. Lucky we did the checking before the event, I cannot imagine if we were to discover the bug during the actual event itself. It will be embarrassing.

21/11
The very first thing I did in the morning was a final check and test before the kids starts to come in. While Hock is coding the sender for the tile display. I did the testing and checking and Ming Hong helped me and we discovered another bug which was quite unexpected because I never knew that it will happen. The bug that we discovered was if one of the user is rotating the pieces and the other trying to snap. The result is the snapping will not happen until the rotation is stop. Luckily we manage to fixed the bug before the event starts. After solving, I did not stop testing and checking because I was scared that there were more bugs. Finally, everything is settled down and the check was over. No more bugs were discovered.

We were told that the kids will be coming in to our lab around 2.30. Around 2.30 the kids came in and Cheng Teng showed the kids by using a lightdraw in Google Earth. All of them were amazed by it and Cheng Teng gave them some explanation on how Lightdraw works but I don't think the kids are interested. They are more interested in trying it instead of listening. After the short explantion, the kids were given chances to try and the whole room went in to total chaos because everyone wan to play. So the drawing board was switch on because it allow more kids to play with it. We did not give them laser because we do not want them started to shine each other's eyes with it. We gave them torches and they started to draw with it. I can see that they are enjoying themselves with the drawing. Even some of the adults were having fun with the board. The second batch came in 5 mins later after the first batch has left. They played with our puzzle app and the room went in to chaos also because everyone was trying to control each other pieces. They also tried the drawing board too. After that, we went to the pantry for light snacks and for the first time the pantry is filled with kids.

After the event, we continued with our work which Hock has completed the sender and we were able to run the app on local computer. We tried the app on 2 computers but we were unable to let the app work properly. We suspected that it is the firewall is prventing the receiving of the packets. We will fixed the problem on Monday.

Pictures :













































Weekly Reflection :
Things I have learned for this week is testing and checking for an application is very important because you will never whether your program is bug or have errors. Testing and checking can never be done by one person because you might not know as others might find a bug which you did not expected. I also learned that we must always communicate with team members in a project to establish common understanding on the objectives and tasks for a project.

Monday, November 17, 2008

Difficulties of integrating lightdraw with 2x3 tiles

Difficulties of the integration

-The brightness of the 2x3 is too bright. When the laser shine on the screen, the screen is brighter than the laser.
Attempted to solve the problem by changing the brightness, consulted Bernard and he said that we can't change the brightness.

- Logitech webcam too small, therefore we need to move towards the back of the room to capture the whole screen. 

- Cannot place the camera at the back because there are no space due to the projector racks and frame.


Sunday, November 16, 2008

Week 4

Week 4

10/11
We integrate the new lightdraw code with our app and it took us the whole day because we need to change some stuffs before the app can work. Nevertheless, we were able to complete the integration but it can only work for single user not multi users.

11/11
We were unable to use ming hong's method to integrate multi user for our app because we did not understand the method and some of the values that are needed such as CvSeq and more. Kevin came in and brief us on the project that we will be working on after the game app. Wilson and ryan will be working on a new app using MAC Quartz Composer. Me and you hock will be working at the 2x3 tile display which require us to integrate lightdraw on the display. I would say each project has it's own diffculty but our aim is to learn new things at the end of the day and share with each other. We were also told that after doing the tile display we will be developing an app which Kevin described it as our masterpiece for the whole internship.

At the end of the day, we were unable to integrate multi user for our app.

12/11
Ming hong came back and explain how the method works. He also help us a bit with the integration. You hock tried several ways to integrate and we were unable to integrate successfully. We tried to debug but we were unable to solve the problems.

The other team integration with multi-user work fine for them but they could only play with 2 paddles instead of 4 because they only coded for 2 paddles.

13/11
Kevin came in the morning and gave us a more detailed briefing on the project that we are working on. Bacsically me and you hock will be using linux to deploy lightdraw on the 3d viewer program and also make lightdraw work on the 2x3 display. Wilson and ryan would be using Quartz composer to develop an app.

After lunch, Bernard brought us up to the server room and gave us a little lesson on how the system works. It is basically clustering computers together and controlling them perform certain tasks. We also learn about the architecture of cluster computer and many more. We continued with the integration of multi-user for the app and we were unable to get it working properly. We can make the laser shine on the puzzle piece and the rotate corner will appear but we cannot make it rotate and drag. We hope to make the whole application work by the end of the week because the dateline is tomorrow. Hope tomorrow will be a better day!

14/11

















Kevin testing our application

Kevin came in the morning and asked us to give a demo on our app. We told him that our app could not work on multi user so he told us to demo on the single user. Kevin was not very satisfied with our developement because we did not make the app ease of usage. He was not happy with our demo because we did not prepare for the demo and the ways we do our demo. He corrected our mistakes on the way we do our demo such as getting prepared for the demo and may other more.

During lunch, Kevin told us that we need to give a demo to our boss. We had roughly an hour to prepare for demo. We did some changes to our codes and make last minutes preparation for the demo because we did not want the same thing to happen again like the morning. During the demo, we showed our boss on the app and described on the platform used to develop the app. He gave us some feedbacks and suggestions on how to imporve on our app. After the demo, Ming Hong help us a little on the multi-user part and we were able to drag and rotate for mulit user.

Weekly Reflection :
I learn about CvSeq and roughly how it works. I also learn about the method that are used in the lightdraw to detect multiple lasers. I learned about cluster computers and how they worked. I also learned about the importance of being prepared at all times and mistakes that we must avoid during demos.

Monday, November 10, 2008

Week 3




(p.s kevin if we cannot put this video, just inform us and we will remove it.)


Week 3: 
The video above can show the result and the work done for my week 3. I will summarize the work done.

This is what the jigsaw app can do:
- User can input their favorite picture by entering the file path and the number of pieces can be set by square root number such as 4,25,36 etc.
- Drag the puzzle piece
- Rotate the puzzle piece from the 2 corners
- Puzzle Pieces snap together
- Integrate with lightdraw successfully.
- Only allow single user, will continue to explore on multi user on week 4

Weekly Reflection :
I am used to IDE debugging because I can put break points and check my errors easily but since we are using notpad to code so I cannot put break points to check.
So I have to debug more effectively using print line or cout(method to output messages and values) through this process. 

Monday, November 3, 2008

Week 2

I will update the blog weekly because I am too lazy to update them day by day.

27 Oct
Public holiday.. Happy Deepavali.

28 Oct
Presented our ideas on the simple app to integrate with lightdraw. My idea was to create a game similar to iPhysics game in ipod touch and iphone. However, after some discussion with kevin we felt that the game might take a longer time to complete. Our main objective is not on the app because it is just a practice for us to learn and understand more about c programming. 
After lunch, kevin had a change in plan which we were spilt into 2 different teams and develop 2 different applications. Me and youhock were one team and we were assigned to the app Jigsaw Puzzle. Ryan and wilson developed Pong Game.  Had a little lecture on C programming and it was very boring and confusing because there are so much things to remember and learn.

29 Oct
Me and hock had some discussions on the app and we decided to look for jigsaw open sources and from there we develop in to our own. We could not find any good open source and were stuck for quite long. Kevin told us to create our own instead of using other people's codes because they are hard to read and understand. Kevin also told us to reference the source for the flow of the game.
We split the app into different parts such as rotation of the pieces, snapping and others. So i started off by doing the rotation for the pieces.

30 Oct
 Continue with the rotation method and added a method to generate random start angle for the pieces. I continued on mouse events which I did some research on the several mouse events. I create a mouse event for the drag image and encountered some problems because I not very sure about the mouse events.

31 Oct
Continue with the mouse event to drag the image. Finally, I can drag the image after some help from Ming Hong. Even though i create the rotate method but its only for the start. I need to create a mouse event to rotate the piece. Had a little discussion with kevin on the different ways to rotate an image such as placing the mouse over at the corners and do a click. So I use the method where rectangle will appear whenever a mouse is over it and user can click on the corner to make the piece rotate. 

Weekly Reflection
For this past week I have learn and understand more about c programming. I also learned that communication skills is very important for us. The reason been that we have good ideas but we cannot present it to our boss so the effort is wasted for planing and thinking.