From dcaec93a0e4b629bb07fcdd72dcb4c71b0d52530 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Sat, 6 Oct 2018 20:09:15 +0530 Subject: [PATCH] Update on opencv until read image --- opencv.html.markdown | 45 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/opencv.html.markdown b/opencv.html.markdown index 75ef7168..7e048df5 100644 --- a/opencv.html.markdown +++ b/opencv.html.markdown @@ -1,15 +1,52 @@ --- -language: c++ -filename: learncpp.cpp +language: c++/python +filename: learnopencv.py contributors: - ["Yogesh Ojha", "http://github.com/yogeshojha"] --- -# Opencv +### Opencv + +OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real-time computer vision. +Originally developed by Intel, it was later supported by Willow Garage then Itseez (which was later acquired by Intel). +Opencv currently supports wide variety of languages like, C++, Python, Java etc + +#### Installation +Please refer to these articles for installation of OpenCV on your computer. +* Windows Installation Instructions: + + +* Mac Installation Instructions (High Sierra): +https://medium.com/@nuwanprabhath/installing-opencv-in-macos-high-sierra-for-python-3-89c79f0a246a + +* Linux Installation Instructions (Ubuntu 18.04): + + +### Here we will be focusing on python implementation of OpenCV + +* __Reading image in OpenCV__ +``` +import cv2 +img = cv2.imread('cat.jpg') +# Simple isn't it? +# Displaying the image +# imshow() function is used to display the image +cv2.imshow('Image',img) +# Your first arguement is the title of the window and second parameter is image +# If you are getting error, Object Type None, your image path may be wrong. Please recheck the pack to the image +cv2.waitKey(0) +# waitKey() is a keyboard binding function and takes arguement in milliseconds. For GUI events you MUST use waitKey() function. +``` Further Reading: An up-to-date language reference can be found at - + Additional resources may be found at + +Good OpenCv Tutorials + + + +