Setting up OpenCV on Mac OSX Snow Leopard

2

Posted by Noj | Posted in Uncategorized | Posted on 06-07-2010

OpenCV is this god like library written in C/C++ that is used for computer vision. It has more than 500 algorithms and many modules for doing various different computer vision tasks. I thought I might give it a go.

After quick googling I landed on http://opencv.willowgarage.com/wiki/ . Downloaded OpenCV from sourceforge.net and ran make. Gave some error that it needs cmake. I downloaded cmake and ran the installer again. It still failed giving a 200 line error that made no sense.

I then did heaps more googling. Someone suggested to do a “sudo port install opencv”. Tried installing through macports. Even that failed as openCV had dependancies on 30 different libraries. Some libraries weren’t compatible with x64 architecture. I tried installing the libraries one by one by forcing macports to find x64 versions, but that failed as well. Some libraries won’t just get along with me.

Then after 3 days of painful searching and googling and trying out every possible method out there, I came upon this website http://vislab.cs.vt.edu/~vislab/wiki/index.php?title=Vision . It had a pre-built openCV mac framework. It had a beautiful installer and it installed like a charm. Moral of story “Terminal Geeks sometimes need to learn on how to make installation process easier for those who aren’t experts  in the domain”.

Then was there was another challenge. How do you get the code to compile. After another day of rumbling and swearing at openCV. I came upon this magic line. “-arch i386″ was the key here.

g++ -O3 <filename>.cpp -arch i386 -framework OpenCV -o <filename>

Also you’ll need to change the C/C++ headers in the following form.

“cv.h” – <OpenCV/OpenCV.h>
“highgui.h” – <OpenCV/highgui.h>
“cvXXXXX.h”-<OpenCV/XXXXX.h> where XXXXX is a library like cvaux, cvcompat, cvcore e.t.c

Hope this blog post can save others time who have similar problems. I will be uploading videos and my experiments shortly.

Big Brother’s watching you – Internet Privacy

0

Posted by Noj | Posted in Uncategorized | Posted on 05-03-2010

It was in the 90’s when people were scared of putting their full name on a website. It was considered dangerous to give out so much information. We’ve moved miles when it comes to posting private information on the internet. There is a known rule “If you are on the internet, you can’t go back”. We’ve all seen people (not to mention names or acts), do some dumb stuff e.g posting to the wrong e-mail, some private mobile vidoes exposed on youtube.

There is a pretty interesting site called pleaserobme.com that does a very simple twitter search on “left home”, and shows their tweets.  A very handy site for people who want to be rich without working hard.

Now don’t get me wrong here, the Internet is one of the greatest inventions of humanity. Where there is people there is scams and spams.

It happens to be so that whenever we are having lunch at our office and get to a discussion about technology and various API’s. The topic of privacy pops in every now and then. Funnily enough it also happens every now and then that the conclusion that comes is that

“THERE IS NO UNDO ON THE INTERNET, PROCEED WITH CAUTION AND DON’T DO ANY STUPID SHIT”.

We live in interesting times. – (Quote from modius). More on that in the next post.

Facebook Facebook Facebook – What’s the Buzz ?

2

Posted by Noj | Posted in Uncategorized | Posted on 01-03-2010

Hello World! , Its been a while since I have blogged.

I have developed a few internal facebook apps before, in my free time just to play around. One of the apps I built periodically checks a website for picture gallery updates, and syncs it with a facebook picture album. Its a very simple app, but got me around to understand the facebook app anatomy.

I have been doing some custom facebook apps for clients (can’t talk much about it), and so far it has been a good learning experience. A few things I have learned about facebook that I didn’t previously know.

According to Facebook Statistics

  • More than 400 million active users
  • 50% of our active users log on to Facebook in any given day (200 Million)
  • More than 35 million users update their status each day .

This is some ridiculously big figures. To put this in perspective, If all the active users of facebook formed a country, it would be the third largest country after india and china.

Now Imagine this, just considering if 200 million people log onto facebook each day, and you somehow got a way to convince only 0.5% of its members to pay up only $1 in an year, you could still be making $2 million in a year. That $1 could be broken up in micropayments of 20 cents. 20 cents doesn’t sound big does it ?

I recently read an article about “How to Spam Facebook like a pro – Insider’s confession” , A very interesting read about how big money will make people cross their limits on ethics. Don’t worry I won’t do any of those. I like programming to solve real world problems, not to create em.

Another article about “Zynga” (yep the company that makes the annoying farmville app). Largest social application dev house, with about 10 million unique visitors a day. Just shows, you don’t need to make a crazy 3D super graphics game. Even with a simple flash game, you can make millions. According to allfacebook stats, its total suite of apps has about 65 million visitors a day, and about 234 million active users. (yes! this blog post is all about millions. lol! )

Another simple example, is a facebook app call “Big Prize Giveaways” which holds some sort of competition, but to take part in the competition you need to be a fan. Guess how many fans they have ? Almost 3 million. With 3 million people as fans, a company could directly reach its customers, get to know where it needs to improve its product line, get a massive list of potential buyers e.t.c

To wrap up I would like to say, I have just begun my journey into what I previously thought was just a fad, but now seems like serious platform for writing apps.

So what do you think about facebook ? Leave your thoughts below in the comments section.

5 Reasons why HTML5 will still be friends with Flash.

3

Posted by Noj | Posted in Uncategorized | Posted on 15-02-2010

Recently we’ve all seen the buzz about HTML5 going to kill flash from mac-fans because their God steve said “Whenever a Mac crashes more often than not it’s because of Flash. No one will be using Flash,  The world is moving to HTML5.”

A bit of background, I spend 8 hours a day working with web front ends both in  javascript/html/css and flash/flex. I tend to use appropriate technologies where necessary. I believe to solve a problem ‘You need to use the right tool for the right job’.  HTML and flash aren’t quite substitutes of each other, both have some subsets overlapping but from a broad view you can see why each technology was created. I am a RIA (rich interactive app) developer and not a flash developer, I use whatever tool that best fits my problem.  Gskinner has a much more awesome blog post about it. Below are 5 reasons why HTML5 will still be friends with Flash
Read the rest of this entry »

Thoughts on building a faster Web.

0

Posted by Noj | Posted in Uncategorized | Posted on 11-02-2010

Recently I’ve been following Google’s “Lets make the web faster” initiative. Speed is addictive. (Not the drug). Imagine browsing the web and having a feeling that you’ve downloaded the whole web.  Yep! that’s a good dream to achieve. Below is a list of ideas, I think could make the web faster.

Read the rest of this entry »

Hello world!

3

Posted by Noj | Posted in Uncategorized | Posted on 04-01-2010

I welcome you to codeexplode.com  blog which aims to publish my ideas, rants, and thoughts about the software world.

Let me start by telling you a short story about myself. My name is Noj, I have been interested in computers since my Dad bought us a first computer when I was about 15.  My Dad is the CEO of one of africa’s largest plumbing companies Trident Plumbers (yeah I built the site). He wanted me to be in the plumbing or the construction game when I grew up. When I started at University of New South Wales, I was pursuing Civil Engineering for the first semester.

Read the rest of this entry »