Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arif-miad/introduction-to-open-cv
Computer vision is a field of study focused on enabling computers to interpret and understand the visual world. OpenCV provides a comprehensive set of tools and algorithms for various tasks in computer vision, including image and video processing, object detection and tracking, facial recognition, augmented reality, and mor
https://github.com/arif-miad/introduction-to-open-cv
data-science deep-neural-networks
Last synced: 1 day ago
JSON representation
Computer vision is a field of study focused on enabling computers to interpret and understand the visual world. OpenCV provides a comprehensive set of tools and algorithms for various tasks in computer vision, including image and video processing, object detection and tracking, facial recognition, augmented reality, and mor
- Host: GitHub
- URL: https://github.com/arif-miad/introduction-to-open-cv
- Owner: Arif-miad
- License: apache-2.0
- Created: 2024-03-14T00:47:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-14T01:10:27.000Z (10 months ago)
- Last Synced: 2024-11-14T17:08:59.707Z (2 months ago)
- Topics: data-science, deep-neural-networks
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# introduction-to-open-cv
Computer vision is a field of study focused on enabling computers to interpret and understand the visual world. OpenCV provides a comprehensive set of tools and algorithms for various tasks in computer vision, including image and video processing, object detection and tracking, facial recognition, augmented reality
```
pythonimport numpy as np
import cv2
import matplotlib.pyplot as plt
image_path = "/kaggle/input/introduction-to-open-computer-vesion/Image.png"
image = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
blur = cv2.GaussianBlur(image, (5,5),0)
edge = cv2.Canny(blur, 100, 200)
contours, hierarchy = cv2.findContours(edge, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
contour_image = cv2.cvtColor(image, cv2.COLOR_GRAY2BGR)
cv2.drawContours(contour_image, contours, -1, (0, 255, 0), 3)plt.figure(figsize = (10, 12))
plt.subplot(1, 3, 1)
plt.imshow(image, cmap = "gray")
plt.title("Orginal Image")
plt.axis("off")plt.subplot(1, 3, 2)
plt.imshow(edge, cmap = "gray")
plt.title("Edge Image")
plt.axis("off")plt.subplot(1, 3, 3)
plt.imshow(contour_image)
plt.title("Contours")
plt.axis("off")plt.show()```
![image](https://github.com/Arif-miad/introduction-to-open-cv/assets/83044522/cc17c9aa-86c0-484c-a428-8b40ab2994a2)
![image](https://github.com/Arif-miad/introduction-to-open-cv/assets/83044522/a2ea9111-ef8b-461c-be80-f707679751bf)