You don’t want to reveal your face any chance! – that’s what this project is all about.
IF you are here that means you tried building a computer vision project in which you tried to detect face and than blur it. But while implementing the code on your system you run into many errors. And got frustrated.
Nothing to worry upon, I will get you cover up. In this post I will show you all the errors that you could face while creating your face blur python project which involves computer vision.
We will start from errors that you will face while installing open cv, to error that you see in opening your web cam using python. I will also put some other links that will help you to get indepth knowledge of the cause of error and solution to it.
face blur code –
You copy this code on your ide and try it. Solution to error you will face is provided below.
Same error also occur in other computer vision project : Realtime Hand Detection using Python Open-cv Project
error 1. Installation error open-cv (cv2)
Most common error faced error in open-cv installation is that when you import the open-cv library you write cv2 But when you install it with opencv.
in windows you will see error – no module name cv2 while installing because is opencv.
error 2. module ‘cv2’ has no attribute ‘Cascadeclassifier’
python functions are case senstive. And sometimes there are high chances you miss the upper case letters and get this attribute error.
Error is because the name of attribute is CascadeClassifier. Same is with cv2.waitkey(). Its waitKey() not waitkey().
These little things mess up the projects.
error 3. detectMultiScale error
On many tutorials you will find that .xml file is directly linked to CascadeClassifier but sometime it is difficuilt for system to find this file so you need to do many tweeks. But its easy solution is to add a prefix ‘cv2.data.haarcascades +’. It will resolve the error.
These were some of the few common errors that you face while implementing face blur python project. If you are facing any problem regarding the same or other project in python. contact me @ email@example.com
Hope you get how to resolve the basic errors that you face while creating a open cv project.