Coder Social home page Coder Social logo

learn-opencv-in-3-hours's Introduction

LEARN OPENCV IN 3 HOURS USING PYTHON - INCLUDING EXAMPLE PROJECTS

Watch Video

What will you learn ?


Virtual Painter Document Scanner Number Plate Detector

Contours Detection Color Detection Face Detection

Prerequisites


Index Topic Image Video Description
1 Introduction to Images Watch Now Basic concept of Images. The RGB Channels and Gray Scale Images.
2 Installations Watch Now Installation process of Pyhton, OpenCV and the Pycharm IDE

Chapters

Chapter Topic Image Video Description
1 How to Read Image Video-Webcam Watch Now Learn how to read images videos and webcam.
2 5 Must Know OpenCV Basic Functions Watch Now 5 Must know opencv functions for beginners. Gray Scale, Blur, Edge Detection, Dialation and Erosion.
3 How to Crop and Resize Images Watch Now How to crop and resize and iamge. Resize could be used to scale up or scale down an image where cropping can be used to get a part of the image.
4 How to Draw Shapes and Text Watch Now Learn to create blank images along with how to draw Lines, rectangles, circles and custom text.
5 Warp Prespective/BirdView Watch Now Learn how to creat a warp prespective of a selected area of an image using fixed points.
6 Joining Multiple Images to Display Watch Now Join multiple images together as one image for easy visualization of the workflow. Learn how to do it for smaller noumber of images and how it could be scaled up to have several images in the same image.
7 Color Detection Watch Now How to detect any color in an image using the HSV space with the help of opencv Trackbars.
8 Contour/Shape Detection Watch Now How to detect shapes of objects by finding their contours. Contours are basically outline that bound the shape or form of an object. So we will be detecting multiple shapes and how many corners points each shape has along with its area .
9 Face Detection Watch Now How to detect faces in realtime using Viola Jones method.
___ ___________________ ______________________________ __________ ____________________________

Projects


Project Topic Image Video Description
1 Virtual Paint Watch Now Detecting Color and using colored marker to draw virtually.
2 Documnet Scanner Watch Now In this project we are going to create a simple document scanner using opencv. We will learn how to run this in real time
3 Number Plate Detector Watch Now In this project we will detect number plates on cars in realtime and save them with a click of a button.

Notes


Index Comment
1. Recommended IDE: PyCharm Community edition
2. Python: 3.7.6

learn-opencv-in-3-hours's People

Contributors

aquib1011 avatar murtazahassan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-opencv-in-3-hours's Issues

ColorPicker.py Question

From project 1 you use the Colorpicker.py to get the right values you need. when running the Code I get a problem with it at:

[ WARN:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-2b5g8ysb\opencv\modules\videoio\src\cap_msmf.cpp (435) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
Traceback (most recent call last):
imgHsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
cv2.error: OpenCV(4.4.0)

Im using python 3.7.6 and I have cv2 imported

lambo.png vs lambo.PNG in chapter 3 and chapter 7

The image lambo.png is used in chapter 7, and also in the video for chapter 3.

In the Resources directory the file is labeled lambo.PNG so the above exercises throws an error.

Changing the Resources filename to lambo.png will take care of these errors.

Note: chapter 3 video code uses lambo.png and the GitHub code uses shapes.png. This really is not a problem if lambo.PNG is changed to lambo.png

haarcascades error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

Continue getting this error for drone face tracking course, I think it is due to the file. Any ideas?

My Code:

import cv2
import numpy as np

def findFace(img):
faceCascade = cv2.CascadeClassifier('Resources/haarcascade_frontalface_default.xml')
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(imgGray,1.1,8)

myFaceListC = []
myFaceListArea = []

for (x,y,w,h) in faces:
    cv2.rectangle(img,(x,y),(x + w, y + h),(0,0,255),2)

cap = cv2.VideoCapture(0)

while True:
_, img = cap.read()
findFace(img)
cv2.imshow("Output",img)
cv2.waitKey(1)

Error:

File "C:/Users/zachd/PycharmProjects/droneproject2/venv/Face Tracking.py", line 20, in
findFace(img)
File "C:/Users/zachd/PycharmProjects/droneproject2/venv/Face Tracking.py", line 7, in findFace
faces = faceCascade.detectMultiScale(imgGray,1.1,8)
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-oduouqig\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

[ WARN:1] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-oduouqig\opencv\modules\videoio\src\cap_msmf.cpp (434) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

No such file or directory

Hello,

I'm starting to learning python and I'm having difficulties to read the lena's image. When I try to run the program appers the error "no such file or directory". I would like to know how I can fix that.

Att

Project2

What's the function of the project2? Why my computer always display the windows "WorkFlow" but "ImageWarped"

Project 1

IN OPENCV 3 the cv2.findContours function return 3 values.
namely im2, contours, hierarchy.

The code from project 1 throws an error about the unpacking of value or value assign error.

getting an issue in project1.py file

Traceback (most recent call last):
File "C:/Users/mayur/PycharmProjects/OpenCV projects/read.py", line 20, in
findColor ( img, mycolors )
File "C:/Users/mayur/PycharmProjects/OpenCV projects/read.py", line 16, in findColor
cv2.imshow(img,mask)
cv2.error: OpenCV(4.5.2) ๐Ÿ‘Ž error: (-5:Bad argument) in function 'imshow'

Overload resolution failed:

  • Can't convert object of type 'numpy.ndarray' to 'str' for 'winname'
  • Can't convert object of type 'numpy.ndarray' to 'str' for 'winname'
  • Can't convert object of type 'numpy.ndarray' to 'str' for 'winname'
    Screenshot (39)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.