Code Monkey home page Code Monkey logo

opencv-object-face-tracking's Introduction

OpenCV-Object-Face-Tracking

Face and Objects tracking with OpenCV and Python

opencv-object-face-tracking's People

Contributors

mjrovai 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

opencv-object-face-tracking's Issues

cv2 module not found

I set up everything fine. even matched with you. but when I compile the program an error is shown that no module called cv2 found. What is the solution?

TypeError: object of type 'NoneType' has no len()

Dear All,

i have try to running code by command promp and below error has been occured.

==================
(cv) pi@raspberrypi:~/Documents/LatOpenCV $ python object_detection_position.py
[INFO] waiting for camera to warmup...

Positioning servos to initial position ==> Press 'q' to quit Program

Traceback (most recent call last):
File "object_detection_position.py", line 111, in
if len(cnts) > 0:

File "objectDetectCoord.py", line 69, in
if len(cnts) > 0:
TypeError: object of type 'NoneType' has no len()

But while running py file by Mu python editor, no error was found.

looking forward any advices, thank you

Arief (Beginner raspberry hobbyist)

Some issue

Hi,

This code is awesome!
I added some feature: MySQL, Web interface and I planning to merge the Data Gathering and the Recognize processes.

But I found some bug:
RPI3, Python 3 and OpenCV 3.3

  1. There are no cv2.face.LBPHFaceRecognizer_create() function
    I modified:
    recognizer = cv2.face.createLBPHFaceRecognizer()

  2. There are no write() only the save() function:
    recognizer.save('trainer/trainer.yml') # recognizer.save() worked on Mac, but not on Pi

  3. The predict function gives back only one variable, the id:
    id = recognizer.predict(gray[y:y+h,x:x+w])

Use it in vnc

This code is awesome!
However,I have a problem that when I use this program in VNC, there will be the following error:

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/pi/opencv-3.3.0/modules/highgui/src/window.cpp, line 325
Traceback (most recent call last):
  File "simpleCamTest.py", line 18, in <module>
    cv2.imshow('frame', frame)
cv2.error: /home/pi/opencv-3.3.0/modules/highgui/src/window.cpp:325: error: (-215) size.width>0 && size.height>0 in function imshow

How can I solve this problem?
THX :-)

cnts type error

Hello and thank you for your guide and codes!
I'm having a type error as cnts being a "NoneType" and cannot use with len() function.
This is the original error:
TypeError: object of type 'NoneType' has no len()

Importing cv2

Hi.
I really love the project and i'm using it as a template for a school project. I only have one problem that keeps occurring and it's when i try to import cv2. I'm doing all the programming on a Raspberry Pi 3 Model B with Rasbian installed. I can import the cv2 in the normal python IDLE, in the terminal. Can't get it to work with any IDE Editors though, only gets the error "ImportError: No module named cv2". Even when i try running the simpleCamTest.py i get the same error. If i type the code manually the import works but i get a new error.

"OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/pi/opencv-3.3.0/modules/imgproc/src/color.cpp, line 10638
Traceback (most recent call last):
File "", line 5, in
cv2.error: /home/pi/opencv-3.3.0/modules/imgproc/src/color.cpp:10638: error: (-215) scn == 3 || scn == 4 in function cvtColor"

Was really hoping to get the project going, but can't really get anywhere when even the template itself isn't working :D
Thanks in advance

Issue on running simpleCamTest.py

Hi Marcelo
Thanks for your example code, I came across a problem when I try Python simpleCamTest.py, the error is as below, can you give me some suggestion, the OpenCV version is 3.4.1

OpenCV(3.4.1) Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/pi/opencv-3.4.1/modules/imgproc/src/color.cpp, line 11147
Traceback (most recent call last):
File "simpleCamTest.py", line 16, in
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(3.4.1) /home/pi/opencv-3.4.1/modules/imgproc/src/color.cpp:11147: error: (-215) scn == 3 || scn == 4 in function cvtColor

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.