Fifth Year at Srishti

It’s my 5th year at Srishti and I’m still getting used to. I started with the post graduation studies in Innovation and Experience Design at Srishti Labs in 2013. Later on, I joined Srishti again as a Research assistant and worked in Art in Transit project in 2016. And I have now joined Srishti third time as a full-time faculty member. And this was a choice that I had to make despite Mathscapes and Mimo56 DesignLab since I have always been expressing the problems with scientific/tech. education scenario we have here in India. Now is the chance to do my bit.

2017 marks the true beginning of future that I envision for me. My focus now in Srishti is to get into research driven teaching. I’m assigned to teach two units in this cycle — Interaction Design 1 (with Riyaz Shaikh) for B.Des 2nd/3rd years, and Interaction Design beyond Screens (with Dr.Naveen Bagalkot) for M.Des 2nd years. Both involve unique challenges to deliver the classroom content which also resonates with the problem that I feel is prevalent in the formal education today and aligns with my personal vision.

Conditions that I have set for myself for constructing and delivering content for classes at Srishti are —

  • Not limiting or changing the actual jargons used in the scientific domain.
  • Not to overdo the participative activities — too much fun takes away the seriousness.
  • Not to oversimplify things for the sake of class.
  • To encourage Q&As, and sometimes break the flow of class to discuss things off the plan.

I will elaborate the above points with justifications in another post sometime.

Installing OpenCV 3.1 for Python on MacOSX Sierra

Originally developed by Intel, OpenCV is a real-time computer vision programming library available for cross-platform usage. The library is cross-platform and free for use under the open-source BSD license.

“It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform. Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 14 million. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics.”
— OpenCV Org.

OpenCV, despite being powerful is slightly intimidating for beginners due to its slightly long installation procedure. I’m writing this simple guide to get started with OpenCV 3.1 for Python on MacOSX Sierra to simplify the setup process. Feel free to leave suggestions in the comments.

For this installation, I will be using Anaconda (Python Distribution and Package Manager) which is simple, to begin with. I’m using Anaconda 4.4.0 for MacOSX with Python 3.6 on my computer.

While Anaconda comes with major scientific Python modules, it doesn’t come with the OpenCV module. But OpenCV module (unofficial) is available on few Anaconda package channels. We’re here going to use Menpo/OpenCV 3.1 to install OpenCV.

Note. While the latest stable release of OpenCV is 3.2 (as I’m writing this) but OpenCV 3.2 is not available for x64 channels on Anaconda. Hence, we will be using 3.1 here.

Step 1. Open Terminal and create a new Python environment.

conda create -yn opencvtest python=3.5

Make sure that you use Python 3.5 with OpenCV 3.1, Python 3.6 produces some incompatibilities. The ‘opencvtest’ is the name of the new environment which can be anything else also.

Step 2. Switch environment

source activate opencvtest

Get into the new environment to install OpenCV and use it.

Step 3. Install OpenCV module

conda search -c menpo --spec 'opencv=3*'

You may search for available builds for the OpenCV module and install the desired one. For this guide, as I said earlier I will be going to use OpenCV 3.1.

conda install -y -c menpo opencv=3.1

This will install the OpenCV 3.1 and its dependencies and you’re now ready to use the OpenCV.

You may now test a simple OpenCV program. The below program uses Haar Cascade classifiers to detect any human faces and eyes and draws a rectangle on the input image.

import numpy as np
import cv2

face_cascade = cv2.CascadeClassifier('path/to/haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('path/to/haarcascade_eye.xml')

img = cv2.imread('image.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x,y,w,h) in faces:
    roi_gray = gray[y:y+h, x:x+w]
    roi_color = img[y:y+h, x:x+w]
    eyes = eye_cascade.detectMultiScale(roi_gray)
    for (ex,ey,ew,eh) in eyes:

Harr-Cascade – Face Detection Example | Photo by Mike Wilson on Unsplash

Hope this will be useful for beginners who want to use OpenCV into their programs.