Goeduhub:- AI, ML, HADOOP, Python and IOT Training provider.
Register for Free Certified Workshop on AI & Machine Learning :: 26-01-2020 || Career options for aspiring CS/IT, ECE, EE or EIC or EEE Engineers
0 like 0 dislike
25 views

1 Answer

0 like 0 dislike
by (6.7k points)
selected by
 
Best answer

What is OpenCV ?

OpenCV is a cross-platform library using which we can develop real-time computer vision applications. It mainly focuses on image processing; video capture and analysis including features like face detection and object detection.

Features of OpenCV Library

  • Read and write images
  • Capture and save videos
  • Process images (filter, transform)
  •  Perform feature detection
  • Detect specific objects such as faces, eyes, cars, in the videos or images.
  • Analyze the video, i.e., estimate the motion in it, subtract the background, and track objects in it.

How to install opencv3 with Anaconda ?


Steps to install Opencv

Step 1 : Create Virtual Environment in Anaconda

Go to Start Menu -open Anaconda Prompt then type below command

            conda create --name opencv-env python=3.6

Press Y and Enter, the environment will be installed

Step 2 : Install OpenCV

 2.1 Activate the environment using below command

        activate opencv-env

2.2 Install OpenCV and other important packages

pip install numpy scipy matplotlib scikit-learn jupyter

pip install opencv-contrib-python

pip install dlib

2.3 Test your installation

            Open the python prompt on the command line by typing python on the command prompt

import cv2

cv2.__version__

import dlib

dlib.__version__

Getting Started with Images

Read an image

  • Use the function cv2.imread() to read an image. The image should be in the working directory or a full path of image should be given.
  • Second argument is a flag that specifies way the image should be read.
  1. cv2.IMREAD_COLOR : Loads a color image. Any transparency of image will be neglected. It is the default flag.

  2. cv2.IMREAD_GRAYSCALE : Loads image in grayscale mode

  3. cv2.IMREAD_UNCHANGED : Loads image as such including alpha channel

Note :- Instead of these three flags, you can simply pass integers 1, 0 or -1 respectively.

image

Display an image

  • Use the function cv2.imshow() to display an image in a window. The window automatically fits to the image size.
  • First argument is a window name which is a string. second argument is our image. You can create as many windows as you wish, but with different window names.
  • cv2.destroyAllWindows() simply destroys all the windows we created. If you want to destroy any specific window, use the function cv2.destroyWindow() where you pass the exact window name as the argument.
  • cv2.waitKey() is a keyboard binding function. Its argument is the time in milliseconds. The function waits for specified milliseconds for any keyboard event. If you press any key in that time, the program continues. If 0 is passed, it waits indefinitely for a key stroke. 

|| New Year Discount on summer training-2020 ||

20% OFF | on all summer training courses

|| Offer valid till 31-JAN-2020 (Extended Date) ||

Courses & Fee

  1. Augmented Reality & Virtual Reality - INR 15000/-
  2. AI, ML & Deep Learning - INR 12000/-
  3. Robotic Process Automation (RPA) - INR 12000/-
  4. Big Data HADOOP - INR 12,000/-
  5. Internet of Things (IoT) - INR 10,000/-
  6. Web development using python (Django) - INR 8000/-
  7. Industrial Automation (PLC-SCADA) - INR 8000/- 

Limited time offer !! Hurry up!!

[[ CALL - 07976731765 ]]

Register for Training

 Go to your Branch CSE or IT | ECE | EE, EIC or EEEMECE
 Know About Popular Colleges/Universities  List of IITsList of NITs | RTU-KOTA | Manipal University-Jaipur | JECRC University | Amity University Jaipur | BIT Mesra-Jaipur | MODY UNIVERSITY | LNMIIT-Jaipur | JK Lakshmipat | Banasthali Vidyapith | POORNIMA University
 Exams:   List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
Placements:  List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Online Free Training:  Artificial Intelligence(AI) & Machine Learning | Python Programming | Internet of Things-IoT | OpenCV (Open Source Computer Vision Library) | LINUX | Big Data : Hadoop | 
 Goeduhub
About Us | Contact Us   Social::   |  | 
...