2 July 2014

Updates: University of California - San Diego admit, GSoC and more

It's been since 6 months since I last posted an update, and boy there have been some interesting developments!

I'm happy to share that I've been accepted into University of California, San Diego! I'll be pursuing a Masters degree in Computer Science. Going to silicon valley was a long cherished childhood dream. It's exhilarating to see the dream finally coming true! :)

I'm participating in Google Summer of Code this year too. I'll be leading the development of PDE X which will form the basis of the next major Processing release. Before starting GSoC, I worked on PDE X during March-April under the Processing Foundation Fellowship. I shall share the details of my GSoC project in a separate post.

A whooping 11 GSoC projects were selected this year under the Processing Foundation. So we can expect some really amazing results by the end of the summer. The Processing team had a big Hangouts meeting in June, where a lot of GSoC goals and tasks were discussed. It was awesome to interact with fellow team members from around the globe!

I also picked up some new skills by completing two Coursera courses: Machine Learning by Andrew Ng and Programming Mobile Applications for Android Handheld Systems by Adam Porter. The ML course was the more challenging one, with tricky assignments and quizzes. But it was a lot of fun to finally get that perfect score after lots of tries. The android course was less theory oriented and more practical. I learnt some interesting hands-on android prototyping. I hope I'll get around to launching that killer app one day. ;)

Final year at DTU is the time of campus placements. I landed a job offer in the month of January. It was an overseas software developer position. But I decided to opt for higher studies in the end. Looking forward to how that plays out in the coming two years. #yolo

P.S: I recently wrote a Quora answer on "How to build a good profile for graduate studies.." which you may consider checking out.

P.P.S: Stating the obvious, but I'm now finally a graduate! :D


15 December 2013

Setting up OpenCV in Visual Studio 2012

I had previously written a post on setting up OpenCV 2.3.1 on VS 2010. It's been long since I updated it. So here's the new post on setting up OpenCV in Visual Studio 2012.

I'll be demonstrating this with OpenCV 2.4.6 on Visual Studio 2012 Express. I assume that you've got Visual Studio 2012 already installed.

Part 1

  1. Download the OpenCV installer for Windows from the official download page. Using the version just previous to the latest release is generally a good idea.
  2. Run the downloaded .exe. Select the 'Extract to' directory and press 'Extract'. (Selecting a path without spaces is a good idea.)
  3. A folder named opencv must have been created in your selected directory. Rename it to 'opencv<your-version-number>'. For ex, with OpenCV 2.4.6, I renamed it to 'opencv2.4.6'
Part 2

We need to set two environment variables. Refer this if you haven't setup environment variables before.
  1. Create a new User Variable named 'OPENCV' and set its value to the directory where you extracted earlier. 
  2. Edit the variable named 'Path'. Add ";%OPENCV%\build\x64\vc11\bin" (without quotes) if you're running a 64 bit machine or ";%OPENCV%\build\x86\vc11\bin" (without quotes) if you're running a 32 bit machine. If the Path variable doesn't exist, create a new one named 'Path'.

Part 3

Start VS 2012. If it was open previously, exit it and restart.
  1. Click on New Project. (Ctrl+Shift+N)
  2. Under Visual C++, choose Win32 Console Application. Give your project a name. Click on OK.
  3. A Win32 Application Wizard must have popped up. Click Next.
  4. On the next window, make sure you tick 'Empty Project' under Additional Options. Click on Finish.
Extra Steps for 64 bit machines. If you're on a 32 bit machine, skip to Part 4.
  1. If you're on a 64 bit machine, click on Build Menu and select 'Configuration Manager'.
  2. Click the combo box under 'Active solution platform' and select New 
  3. In the next window, under new platform, select x64. Click OK. Close the configuration manager. 

Part 4
  1. Download this zip. Extract its contents to your project folder.
  2. If you're using a version of OpenCV other than 2.4.6, open the OpenCV2.4.6.props file(Choose 32 or 64 bit accordingly) in a text editor. Find and Replace all '246' with your OpenCV version number. For ex, I would replace all 246 to 247 for OpenCV 2.4.7.
  3. In VS, open the Property Manager window. (View  Other Windows  Property Manager)
  4. Click on 'Add Existing Property Sheet'. Select the OpenCV .props file(Choose 32 or 64 bit accordingly). Click Open.
  5. In the 'Solution Explorer Window', right click on 'Source Files' folder → Add → Existing Item. Select main.cpp that you had copied to your project folder.
  6. Set the build target to Release. If you followed all steps correctly, hit the F5 key. The camera should fire up. Press Esc key to close the program.
If you face any problems, leave a comment. I'll try to help.