snap_dead's People
Forkers
hassanismailtech codebykt tauseedzaman srapisardi bayf lucasomac ankushpanday1 vikasgavandi mirtabish adrien4g aakash231217 raghavsharma12 programmingking54 ahmad-360 rushaan1 nikhil1423 atharvs671 winh321 maximilian-winter josefluigihuarangachate aarthy153 labs-apps-exemples mdnazmulhosanbd imtayyabhayat rajab1214 mobyscript rupeshsarvade xero47 haoke98 abuhujaifa022snap_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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.