Custom Search

Thursday, February 26, 2009

cvFindContour problem

My first algorithm for blob detection was to read through all the pixels and find the bright spots. This was slow and no matter how I optimised my code, I was unable to go above 60fps. The bottle neck was the for loop that reads all the pixels.
As a result I changed it to use cvFindContours. This is much faster and after making some changes, I was able to go up to 120fps!
Then came a problem. I was detecting the same coordinates for 2-3 frames before the blob was detected in its new position. This effectively gave me many problems with new blobs and old blobs being generated instead of 1 blob moving across the screen.
A colleague of mine told me that he saw no problem with my code and he encountered this problem before. It is due to the motion compensation process in the video decoder and not opencv.
He worked around this by detecting and ignoring duplicate frames. Does anyone have any other ideas ?

Use your mobile phone as a modem for your laptop

Recently I saw the advertisement on M1 that allows 50GB free of data on your mobile plan with a monthly subscription of S$22.42. It is slightly better than Singtel's plan which offers 30GB free for the same price. With 50GB, I figured I should use this plan to surf on the go on my laptop as well. I'm planning to buy the Sony Vaio P. :)

After subscribing, I need to set up my HTC Touch Diamond to be a modem to surf with my laptop through my phone. Below are the steps to connect via your mobile phone. :)

Make sure you have ActiveSync installed on your PC if you are using Windows XP or earlier. Windows Vista requires the Windows Mobile Device Center.

Open the Internet Sharing program and change the “Network Connection” to “Sunsurf Internet” using the drop down menu.

Finally, select “Connect” and you should see your laptop doing a device driver installation.
You’re now ready to browse the internet using your Windows mobile phone as a modem.

If your phone does not have the Internet sharing program, try the following:

First, use a registry editor such as PHM Regedit to delete the value \HKEY_LOCAL_MACHINE\Comm\InternetSharing\Settings\ForceCellConnection
Soft reset your device and you should see the internet sharing program have the option: "Network Connection"