mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-25 20:14:30 +03:00
[opencv/en] Fix some typos, grammar and spelling (#5032)
This commit is contained in:
parent
3653c1efcc
commit
daa86a4e9b
@ -5,11 +5,11 @@ 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
|
||||
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.
|
||||
@ -18,7 +18,7 @@ Please refer to these articles for installation of OpenCV on your computer.
|
||||
* Mac Installation Instructions (High Sierra): [https://medium.com/@nuwanprabhath/installing-opencv-in-macos-high-sierra-for-python-3-89c79f0a246a](https://medium.com/@nuwanprabhath/installing-opencv-in-macos-high-sierra-for-python-3-89c79f0a246a)
|
||||
* Linux Installation Instructions (Ubuntu 18.04): [https://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv](https://www.pyimagesearch.com/2018/05/28/ubuntu-18-04-how-to-install-opencv)
|
||||
|
||||
### Here we will be focusing on python implementation of OpenCV
|
||||
### Here we will be focusing on Python implementation of OpenCV
|
||||
|
||||
```python
|
||||
# Reading image in OpenCV
|
||||
@ -28,21 +28,21 @@ img = cv2.imread('cat.jpg')
|
||||
# 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
|
||||
# Your first argument is the title of the window and second parameter is image
|
||||
# If you are getting an error, Object Type None, your image path may be wrong. Please recheck the path 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.
|
||||
# waitKey() is a keyboard binding function and takes an argument in milliseconds. For GUI events you MUST use waitKey() function.
|
||||
|
||||
# Writing an image
|
||||
cv2.imwrite('catgray.png', img)
|
||||
# first arguement is the file name and second is the image
|
||||
# The first argument is the file name and second is the image
|
||||
|
||||
# Convert image to grayscale
|
||||
gray_image = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
# Capturing Video from Webcam
|
||||
cap = cv2.VideoCapture(0)
|
||||
# 0 is your camera, if you have multiple camera, you need to enter their id
|
||||
# 0 is your camera, if you have multiple cameras, you need to enter their id
|
||||
while True:
|
||||
# Capturing frame-by-frame
|
||||
_, frame = cap.read()
|
||||
|
Loading…
Reference in New Issue
Block a user