Traceback (most recent call last): File "C:\Users\pydis\PycharmProjects\eyedetection\main.py", line 12, in gray = cv2.cvtcolor(frame, cv2.COLOR_BGR2GRAY) AttributeError: module 'cv2' has no attribute 'cvtcolor' can somebody tell me what to do when i get this error
I keep getting error:OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' For some reason my IDE is not lining the line gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
Nice video. I was writing this code in Jupyter Notebook on my 2019 Macbook Pro and when I ran it and had it activate my laptop's camera to capture my face in live time, it worked, but I was wondering how you're supposed to get out of this. When I pressed "q" it freezes. I know q is the key that's supposed to break the loop and make things stop, but the only way I can seem to get out of this and get rid of that faces window is by restarting my kernel which seems inefficient. I was wondering if there was a better way to do this or if I'm just overlooking something simple. Thanks!
Another great and informative video. Thank you. I'm curious if there are still plans for an Intermediate and Advanced C programming playlist. I was really looking forward to those.
Wrote your code exactly. Ran it for my camera video and it found my face. When I changed video feed to a properly installed video (mp4), I get error: "gray = cv2.cvtColor(frame, cv2.COLOR_GRAY)". Then it says: cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'. Anyone have an idea what is wrong??
fix for the error: (-215:Assertion failed) scn == 1 && dcn == 1 in function 'demosaicing' Change >>>>>>>>>>>> cv2.COLOR_BAYER_BG2GRAY to cv2.COLOR_BGR2GRAY.
can somebody help i got this error:opencv-python\opencv\modules\core\src\persistence.cpp (505) cv::FileStorage::Impl::open Can't open file: 'D:\pythonProject1\venv\lib\site-packages\cv2\data\haarcascade_forntalface_default.xml' in read mode
line 576, in _parse_args a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not module how to fix??? *in cascade_path = pathlib.Path(cv2, __file__).parent.absolute() / data/haarcascade_frontalface_default.xml" EDIT: FIXED, dot, not comma
thanks. now i have basic AI classifying everything in my immediate area as a face or not via my laptop camera. Love it!!!! 🔥🔥
I actually use OpenCV all the time. these are interesting!
Holy thank you so much my man !! There are a lot of face_detection guides on net and I can't find shit that I understand :3 thanks man
Can you show what packages did you install for this tho? This tutorial is pretty incomplete also feels more like a speedrun than a tutorial.
Thanks, G. That was really helpful.
Love your videos man thank you
Works on the first try, thank you!
Traceback (most recent call last):
File "C:\Users\pydis\PycharmProjects\eyedetection\main.py", line 12, in
gray = cv2.cvtcolor(frame, cv2.COLOR_BGR2GRAY)
AttributeError: module 'cv2' has no attribute 'cvtcolor'
can somebody tell me what to do when i get this error
@@pydisekhar Write 'gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)' instead.
There is capital C in 'cvtColor'
@Arnyoung thanks dear
Thankyou so much for the great vid!
great tutorial you made it very simple.
I keep getting error:OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
For some reason my IDE is not lining the line gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
me too, you know how to solve it?
i changed "COLOR_BGR2GRAY" to "COLOR_RGBA2GRAY" and it started working
can we use other trained data for this ?
Nice video. I was writing this code in Jupyter Notebook on my 2019 Macbook Pro and when I ran it and had it activate my laptop's camera to capture my face in live time, it worked, but I was wondering how you're supposed to get out of this. When I pressed "q" it freezes. I know q is the key that's supposed to break the loop and make things stop, but the only way I can seem to get out of this and get rid of that faces window is by restarting my kernel which seems inefficient. I was wondering if there was a better way to do this or if I'm just overlooking something simple. Thanks!
can you send the code
Pro can you send me this code 😢🙏🙏🙏
do i need to install opencv in the python installation directory? or just in any location from the command line?
Another great and informative video. Thank you. I'm curious if there are still plans for an Intermediate and Advanced C programming playlist. I was really looking forward to those.
How can the image be stored in the database?
And how to recover the associated data in the recognized image
Could you please help me?
Thanks bro for usefull and awasome tutorial
Thank you very much sir for this video
Wrote your code exactly. Ran it for my camera video and it found my face. When I changed video feed to a properly installed video (mp4), I get error: "gray = cv2.cvtColor(frame, cv2.COLOR_GRAY)". Then it says: cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'. Anyone have an idea what is wrong??
maybe that function doesn't exist in your installed library? Maybe install again? Different versions?
@@gabrielbiacchi6169 I'll give it a try. Thanks!
does it record the whole time you are using the facial recognition?
Can you do a video series on using git?
Hello, I dont undertsan ",_" of the line _, frame = camera.read()
for which camera to use i think
didnt understand a thing you were just firing on 😭
Same bro same
how do I make it so that it makes the square filled
bro tell me what are the interpreuter extensions i need
fix for the error: (-215:Assertion failed) scn == 1 && dcn == 1 in function 'demosaicing'
Change >>>>>>>>>>>> cv2.COLOR_BAYER_BG2GRAY to cv2.COLOR_BGR2GRAY.
where is the code?
please tell what to do it is constantly saying pip is not recognizes a command in command prompt please help
how do we do the same thing but on pictures?
Am facing problems, it is saying" Cannot find reference 'CASCADE_SCALE_IMAGE' in '__init__.py':19"
what application did you use
vs code
Someone help me, How do I install that harr file (the pretrained model)
I meant casade
What exactly in code tells to find human faces here?
Oh I see, haarcascade_frontalface
Nice tutorial though👍
which Ide are u using
PyCharm
can somebody help i got this error:opencv-python\opencv\modules\core\src\persistence.cpp (505) cv::FileStorage::Impl::open Can't open file: 'D:\pythonProject1\venv\lib\site-packages\cv2\data\haarcascade_forntalface_default.xml' in read mode
I want to ask how to install import CV2, bro? Please answer, sis 🙏
pip install cv-3 write it in terminal
Where is this code? 🙏🏽
Great Video! But I am not able to install Opencv:
suggestion: cvlib works better, why don't you make a video on it. :)
Where is the code ? :/
theres the code on his github
@@_xen_.whats the name of this project on his github?
i just want the script
line 576,
in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not module
how to fix???
*in cascade_path = pathlib.Path(cv2, __file__).parent.absolute() / data/haarcascade_frontalface_default.xml"
EDIT: FIXED, dot, not comma