All PhD students in our department (EE), in the Lyle school of engineering (SMU), are required to give a 15-min lunch-time talk in front of fellow PhD students and professors at least once every semester. This short-time talk/presentation, called the “Brown Bag Talk,” is meant to help PhD students in many ways, such as improving presentation skills, networking skills, etc. In addition, it encourages interaction among students, who are usually working in their own problems, to know about others’ work. However, the talk is not necessarily limited to one’s own PhD problem.
So, when it was my turn to lecture, I decided to talk about the use of open-source tools in research. In particular, I wanted to concentrate on two open-source tools that I regularly use in my everyday work — Python and Zotero. Zotero and its other free and open-source alternative, Mendeley, are very powerful and easy to use citation management system with lots of other useful capabilities. I also demonstrated few of the useful features of Zotero and some of the interesting language capabilities of Python during the presentation.
Here are the slides (images) from the presentation. The presentation contain animations, so I have provided a link to download the slides (powerpoint) from slideboom at the end of this post. Please feel free to use it as it may seem fit.
Few days back I was playing with the eigshow demo in Matlab. It is a pretty useful demonstration of eigenvalue and singular value problems for 2 by 2 matrices. A good description of the eigshow demo in Matlab is here. I was a little surprised not to find an “eigshow” implementation in my favorite computing language — Python. So I thought it might be a good idea to write my own, and here is the result.
The figure below shows the basic structure of the program which is somewhat similar to Matlab’s eigshow. There are some differences too, such as it displays the eigenvalues and eigenvectors in the eigen mode, and the singular values and singular vectors in the SVD mode. The program also displays the rank, trace, and determinant along with the matrix. It also gives a visible warning if the eigen/singular values and/or vectors are complex (as it can only plots the real values and vectors).
(Please continue reading to know about basic function and code)
Python is a very powerful language for doing all sorts of things — from general computing to heavy scientific number crunching and visualization. Python is an interpreted, general purpose, object-oriented, high-level scripting language. The core design philosophy of Python are simplicity, code readability, and expressivity.
Python is easy to learn. It is intuitive and simple, yet it is powerful, beautiful and expressive.
What makes python particularly attractive for scientist and engineers is that it is open-source, highly portable, intuitive to use, and features dynamic and strong typing. It provides both interactive and script based programming environments like MATLAB. It also features automatic memory management and garbage collection enabling scientists and engineers without strong computer science background to worry about their algorithm and let the interpreter handle the low-level stuffs. All the above qualities in addition to its large scientific community-support allows greater opportunity for code-sharing, open and collaborative research and thus supporting the philosophy of reproducible research.
What is even more attractive is that there is a whole scientific-computing ecosystem around Python built by the different scientific communities. Most of the tools are built on top of Numpy, which itself is built on top of Python. Numpy extends Python with capabilities such as vectorization, homogeneous arrays, multi-dimensional arrays, fast element-wise operations, broadcasting and universal functions that are essential for scientific computing. The figure shows a quick overview of the scientific python ecosystem. Please note that it is not meant to be a complete overview, rather a very rudimentary reference to the most common tools around Python for scientific computing. The ease and interactivity of the language coupled with the availability of good community support and specialized scientific libraries enables a newcomer to quickly learn and do meaningful work using Python. The interested reader can read more about the arguments about advantages of Python and how it compares to other languages here.
I started learning Python a few months back. During this time I collected a number of resources related to the use of Python for scientific and numerical computation. I think these resources may help someone who is just getting started using Python for Scientific computing. For this reason I have decided to share a list of those resources here in this blog post.
My interest in computer generated images and animation goes back to when I was in my 9th grade. Our computer teacher (Miss. Banurekha) wanted me and my dear friend Siddharth Choraria to participate in an inter-school computer graphics competition. I wasn’t any computer rock-star, but she had seen my pencil-sketches on the class notice board and thought that we do something useful. Of course, Siddharth was a brilliant student and we worked well together.
We spent several days and nights on the project. We had decided to portray a short story about the inevitable effects of war on human society. After I drew each scene on a graph paper, we manually transferred the co-ordinates (of the best-fit lines approximating the curves in the image) to the computer and drew on it using GW BASIC. There was no concept of key-framing, so we redrew each frame repeatedly, changing only the portions required for creating the animation. We also had no idea that we could use matrices multiplications to transform objects in CG.
Since then I have been very interested in computer graphics. However, I never really took the deep plunge to explore the CG world. So, when the opportunity to learn modern computer graphics from one of the world’s best known professors of CG, Prof. Ravi Ramamoorthi, came in the form of a MOOC course (Foundations of Computer Graphics BerkeleyX), I just couldn’t resist. My main motivation for the course was not only to make pretty (CG) pictures, but also to learn 3D geometry used in CG, ray-tracing and OpenGL so that I could use them in other areas such as computational imaging, scientific computation and visualization. I also wanted to know how people create photo-realistic effects.
In this post I will describe the process of installing OpenCV (both versions 2.4.2 and 2.4.3) on Debian Linux (especially Debian-6). After installing, we will do some tests to verify the installation and also see some examples. As I was trying to install OpenCV on Debian I found that although there is lot of information on similar topics (see the references at the end), I still had to dig around a bit to understand the process completely. Some of the excellent guides are now outdated. Also, I found a few that have all the “what to do” but not “why to do”. Then as I started jotting down my own notes into my OneNote notebook, I realized that I should share these notes with others who are interested. I hope to update this document as I find more useful information in future.
1. Before installing the Prerequisites:
It is recommended [Reference 2] that you update and upgrade your current system before installing OpenCV. You can do this from the terminal using the following two commands:
sudo apt-get update
sudo apt-get upgrade