Skip to content

Commit c80f032

Browse files
committed
add 00 - 01
1 parent 24cc90b commit c80f032

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

00-opencv/readme.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Computer Vision
2+
Computer vision is a process by which we can understand the images and videos how they are stored and how we can manipulate and retrieve data from them. Computer Vision is the base or mostly used for Artificial Intelligence. Computer-Vision is playing a major role in self-driving cars, robotics as well as in photo correction apps.
3+
4+
5+
OpenCV
6+
OpenCV is the huge open-source library for the computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even handwriting of a human. When it integrated with various libraries, such as NumPy, python is capable of processing the OpenCV array structure for analysis. To Identify image pattern and its various features we use vector space and perform mathematical operations on these features.
7+
8+
The first OpenCV version was 1.0. OpenCV is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. When OpenCV was designed the main focus was real-time applications for computational efficiency. All things are written in optimized C/C++ to take advantage of multi-core processing.
9+
10+
11+
12+
13+
14+
https://docs.opencv.org/4.x/da/df6/tutorial_py_table_of_contents_setup.html
15+
https://www.geeksforgeeks.org/opencv-overview/
16+
https://github.com/opencv/opencv

01-reading-image/Media/1.jpg

154 KB
Loading

01-reading-image/app.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""
2+
by default open cv reads images in BGR mode BLUE, GREEN, RED
3+
but otherlibraries cannot show this values properly like matplotlib
4+
so its better to convert this values to BGR before showing it in other libraries
5+
6+
read about color spaces:
7+
https://www.geeksforgeeks.org/color-spaces-in-opencv-python/
8+
9+
"""
10+
11+
import cv2 as cv
12+
13+
14+
filename = "./Media/1.jpg"
15+
16+
image = cv.imread(filename, 1) # filename: str, flags: int
17+
# flags
18+
# 1 0 -1
19+
20+
# convert BGR to RGB
21+
image = cv.cvtColor(image, cv.COLOR_BGR2RGB) # src, code
22+
23+
24+
# showing image with opencv
25+
cv.imshow("Open Cv", image) # winname: str, mat: cv2.typing.MatLik
26+
27+
28+
cv.waitKey(1000) # delay: int => milliseconds
29+
# if 0 is passed its wait until a key pressed on the keyboard
30+
31+
cv.destroyAllWindows() # remove all windows from memory
32+
33+
34+
# showing images with mathplotlib
35+
import matplotlib.pyplot as plt
36+
37+
plt.imshow(image)
38+
plt.title("matplotlib")
39+
plt.waitforbuttonpress()
40+
plt.close('all')

01-reading-image/readme.md

Whitespace-only changes.

requirements.txt

440 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)