Month: February 2017

Installation of Anaconda/python and configure OpenCv with extra module for Linux/ Window.

selection_012

Tutorial to discuss steps on how to install Anaconda 4.20 ย and configure OpenCv3.2ย  in Anaconda 4.20 for python 2.7.

After completing these steps I am sure you can use anaconda/Python2.7ย  and OpenCv with extra modules.

Introduction

In office I was assigned a simple work in image processing which required extra modules of OpenCv in Python. It was simple task but I struggled a lot to configure python with opencv extra modules ๐Ÿ˜ฆ . After wasting my weekendsย  I completed the task on time and came to know how easy it was ๐Ÿ™‚ .

Let us first start with Linux (almost similar steps forย  Window 7).

Linux System:

1]. Download the Anaconda according to your system configuration from below link.

Download Anaconda

2]. In linux open terminal go to download folder run the anaconda installer sh file.

selection_001

3]. Open the /.bashrc fileย  gedit ~/.bashrc and add the line below line at the end of file and save it.

export PATH=”Path to your anaconda directory”/bin:$PATH”

for me it is: ย  ย  ย ย  export PATH=”/home/lord/anaconda2/bin:$PATH”

4]. Go to anaconda2/bin folder by terminal and run spyder apps commands. Spyder is good IDE for python.

selection_003

Anaconda is installed ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ Now data analysis & Machine learning can be performed in python.

Configure Opencv with anaconda

5]. Download OpenCv 3.2 Linux from below link.

ย  ย  ย  ย  ย  Download OpenCV

6]. Extract the opencv.

7]. Go to opencv build/cv2/python/x64/

8]. Selectย cv2.pyd ย  and paste it on Anaconda/Lib/side-packages/ย .

9]. Restart the ide .

Open spyder app and try import cv2. If no error we are done with opencv ๐Ÿ˜€

Configure Opencv extra module with anaconda

Install extra module with conda

conda install -c https://conda.binstar.org/menpo opencv

selection_010

That’s it ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ˜€ ๐Ÿ˜€ย ย  Open spyder and have fun . . . . .

 

Window7 System :

1]. Download the Anaconda according to your system configuration from below link.

Download Anaconda

2]. Install the anaconda in system.

3]. Go to anaconda2/ folder by terminal (cmd) and run spyder apps commands it will open Spyder IDE.

C:/anaconda2>spyder apps

Our anaconda is installed ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ ๐Ÿ˜€ย  we can perform data analysis, ML in python.

Configure Opencv with anaconda

5]. Download OpenCv 3.2 Window7 from below link.

ย  ย  ย  ย  ย  Download OpenCV

6]. Extract the opencv.

7]. Go to opencv build/cv2/python/x64/

8]. Selectย cv2.pyd ย  and paste it on Anaconda/Lib/side-packages/ย .

9]. Restart the ide .

Open spyder app and try import cv2 if no error we are done with opencv ๐Ÿ˜€ .

Configure Opencv extra module with anaconda

Install extra module with conda

conda install -c https://conda.binstar.org/menpo opencv

That’s itย  ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ˜€ ๐Ÿ˜€ย  Open spyder and have fun . . . . .

ppt57

happy_learning

Happy Learning Cheers

 

 

Advertisements