Giter VIP home page Giter VIP logo

snap_dead's People

Contributors

programminghero1 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

snap_dead's Issues

Error in main.py line 13

getting a error in cvzone,
error -
File "C:\Users\username\PycharmProjects\snapchat\main.py", line 13, in
frame = cvzone.overlayPNG(frame, overlay_resize, [x-45, y-75])
File "C:\Users\username\AppData\Local\Programs\Python\Python310\lib\site-packages\cvzone\Utils.py", line 126, in overlayPNG
imgMaskFull[pos[1]:hf + pos[1], pos[0]:wf + pos[0], :] = imgRGB
ValueError: could not broadcast input array from shape (253,253,3) into shape (0,253,3)
[ WARN:0] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

from cv2 import cv2
import cvzone
cap = cv2.VideoCapture(0)
cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
while True:
    _, frame = cap.read()
    gray_scale = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
    faces = cascade.detectMultiScale(gray_scale)
    for (x, y, w, h) in faces:
        cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
    cv2.imshow('Snapchat PHAS', frame)
    if cv2.waitKey(10) == ord('q'):
        break

See, this is my code and when I run it it says this:

C:\Users\Abc\PyCharmProjects\snap_dead\venv\Scripts\python.exe C:/Users/Abc/PyCharmProjects/snap_dead/main.py
Traceback (most recent call last):
  File "C:\Users\Abc\PyCharmProjects\snap_dead\main.py", line 9, in <module>
    faces = cascade.detectMultiScale(gray_scale)
cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

[ WARN:1] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

error

ValueError: could not broadcast input array from shape (441,441,3) into shape (402,441,3)

Attach README

Hi, there

recently I go through your repository and run your wonderful python programme on my machine, and trust me it did not go as smooth as it should be, all because of some missing modules ๐Ÿคฃ๐Ÿคฃ๐Ÿ˜‚.
so, please add a readme with its required modules and some general intro.

  pip install opencv-python
  pip install cvzone

Thankyou

Getting Error

File "PyCharmProjects\snapChat\main.py", line 12, in
frame = cvzone.overlayPNG(frame, overlay, [x, y])
File "venv\lib\site-packages\cvzone\Utils.py", line 126, in overlayPNG
imgMaskFull[pos[1]:hf + pos[1], pos[0]:wf + pos[0], :] = imgRGB
Please help me fix this !

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.