17 October 2009

OpenCV Wishlist

OpenCV has an extensive set of image processing and vision algorithms. Everyone will have their own pet list of things which they would like to see in this. Some of mine "requests" are

  1. Level Sets; even a base level implementation; there are a number of libraries out there, integration will be a huge headache/challenge!
  2. Colour Edge detection, without taking recourse to grayscale conversion. Maybe DiZenzo's algorithm could be a used.
Regarding the general development of OpenCV and computer vision algorithms in general, I think that research groups should be more proactive in contributing code, rather than issue MATLAB dll which would work only on certain versions. After a ll, knowledge is for sharing and it would also increase the citation count if the code were available. Rather than churning out paper after paper using a mysterious black code which is available only to the select coterie, it would be nice if the code were freed up. After all, publishing in academia is about sharing knowledge. If it were an industry code, then perhaps the information hiding is perfectly understood.

OpenCV 2.0 VS 2008 Compilation

A very concise method for building OpenCV 2.0 using Visual Studio 2008 is given here. One can follow the instructions blindly; however there is a problem building the highgui libraries. The error is as follows:
Compiling... ffopencv.cpp Linking... LINK : fatal error LNK1104: cannot open file 'libgcc_.a'

Have posted to the developers as well as yahoo groups.. awaiting response. Will update as soon as i get some reply.

01 October 2009

Laptop and Fedora 11

Finally, I achieved my major goal of buying a laptop. I acquired an Acer 5738G, since it had reasonably good configuration at affordable price. Also, there were no reports of the model coming apart within a few months, though this might be because it is a relatively new model. Acer has played a dirty trick regarding the installation media but more of that later.
I managed to shrink the original C drive to 160GB and create a new partition for installing some version of GNU Linux. I finally installed Fedora 11, 64 bit version. Funnily, there are no Latex packages available on the installation DVD. Also, some programs crib about the non availability of some gdk header files. I did a lot of searching for the missing latex/tetex/texlive packages on Google, but drew exactly blank. If some kind soul could clarify the mystery of Missing Latex packages, I would be eternally indebted. Perhaps the packagers in their infinite wisdom thought that latex packages are too "geeky", and put in exotic language support as default rather than this...
Update
So, I partitioned the original hard disk to get a 100GB partition. The Vista disk partitioner did a great job of it; creating a new partition while the OS is actually using it. I am not aware of any tool for GNU/Linux which does the same job. Anyways, there is a size restriction on the base partition that it should not be below some X GB; I think X=160/120. Fedora installation was also fine. The major problem is that running Fedora 11 gives just the 50% of the battery life of Vista. Is this a problem with the OS? Seems to be so....

OpenCV 2.0 released!

Downloads available at Sourceforge...

05 July 2009

Equations for PPT

Here is a beautiful tool for creating equations within Powerpoint using Latex.

22 June 2009

compilation of recent versions of opencv and ffmpeg

I downloaded a recent version of OpenCV from SVN. I also downloaded a recent SVN version of ffmpeg. This is an informal log of the installation “pains”. I have been using OpenCV since version 0.9.6 and my work fully relies on it. What follows is true for ffmpeg 0.5 also.

Short Version of how I did it

Install ffmpeg with ./configure –enable-shared. Then do ‘make’ & ‘make install’. Do ‘ldconfig’ after installation. check the ffmpeg version by ‘ffmpeg -version’. Note that ffmpeg dumps its header files in 5 header files like libavformat etc. Make a directory called ffmpeg under /usr/local/include., i.e., ‘mkdir /usr/local/include/ffmpeg’. Go to /usr/local/include. Copy ‘avcodec.h avformat.h avio.h avutil.h swscale.h’ from respective ‘lib’ directories to ffmpeg. I prefer sym-linking it.

Then download the latest SVN version of opencv from sourceforge. It is available as a tarball in case you do not feel inclined to run the SVN from command line. After gunzipping and untarring it, we get a directory called opencv. Change directory to opencv. Make the file ‘configure’ by doing ‘chmod +x configure’. Then do ‘./configure –without-1394libs –without-python –disable-apps’. These arguments disable 1394/Firewire libraries, python support and building of applications. I have not faced major limitations by disabling these. There should be a series of messages. Confirm that ffmpeg is recognised and will be used. This will be indicated by a line “Use ffmpeg: yes”. If this does not happen, go back to the step of ffmpeg installation. If you are sure that ffmpeg is installed correctly and you are able to see files in /usr/local/include/ffmpeg/, then one way of checking whether opencv finds the header files is that you search for the keyword ffmpeg in the output of ‘./configure’ typed exactly as previously. In other words, you do ‘./configure –without-1394libs –without-python –disable-apps | grep ffmpeg’. You should get the lines which confirm or deny the existence of the headers ‘ffmpeg/avcodec.h’ availability. If these headers are not found, then your linking or copying is not ok. If on the other hand, ffmpeg has been found, do ‘make’ and ‘make install’ and then ‘ldconfig’.

** For x86-64 users: the configure script has a peculiar tendency of identifying all intel CPUs as pentium4. if you run ‘make’ after ‘./configure’, then you will run into compilation errors saying that architecture specified cannot be compiled. Do not lose heart but open the config.status file and search for the word ‘pentium4′ in this file. You should get something like ‘-march=pentium4′ along with other options. Change ‘-march=pentium4′ to ‘-march=native’ or you can even delete the whole thing. If you have a recent version of gcc, you can enable openmp by adding ‘-fopenmp’ in the same line where you found the previous expression.

The above worked for me. I hope it does for you.

24 April 2009

Profile views

Blogger apparently counts one's own profile views. Strange.

23 April 2009

Slackware funny

From some of my earlier posts, a reader can guess that I am a die hard Slackware fan. I especially love the fortune program. Also, Slackware is probably the only distribution which can generate extremely racist, sexist quotes. The "-o" option stands for offensive. A hugely funny incident happened a few months back. A visiting professor had come to our lab and I suppose he had some familiarity with GNU/Linux distributions. I do not think he has heard of the fortune program.

So, I created a login for him on the lab NIS and asked him to test it. After he had successfuly logged in, the fortune cookie popped out was this,

"This is not your computer. This is your ass."

I read it, asphyxiated with controlled laughter and typed startx as fast as I could and while the XFCE mouse started blinking, I managed to control my guffaw. The professor was however perplexed. He turned to me and said

"I saw some message on the screen. What was it?"

I said that the computer emits random login messages and pointed out that his screen was up and running, it took me an aching jaw and cheek muscles to keep it down to a smile. However, he was not convinced. Scratching his beard, he asked me to show the message again; he wanted to read it. I was pulverised, however I logged off. The professor bent down to have a better look, read the message again. I was shaking with with silent laughter; he turned to look at me. I think he suspected that it was a prank or something. However, he said nothing further. I still get crippled with laughter recalling this incident.

It may not seem very funny, my English is not that good but the spontaneity of the whole incident will remain in my mind till I pop off.

17 April 2009

test post

written using elinks, a text browser

09 April 2009

Emacs multiple buffers management with tabs

I use GNU Emacs fully for programming. When one has a number of files open, called buffers in emacs terminology, it is a major hassle while switching. So, I searched for tabbed windowing within emacs. Unfortunately, in Google if one types "emacs tab windows" or some simple term, the results thrown up deal with setting the size of the tab character. However, here is a link to a blog post which I found to be pretty useful. I am trying out the ido package.