Harbola DataScience

Answer, Read and Post Coding related Questions!

Errors while Creating ‘Face Blur on Web Cam’ – Python Project

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 –

face blur python 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.

linux terminal

fix –

requirement satisfied

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

Original code

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 @ chitranshuharbola@gmail.com

Hope you get how to resolve the basic errors that you face while creating a open cv project.

Chitranshu Harbola

Self taught programmer, Web Developer and an aspiring Machine learning engineer cum Data Science student

2 thoughts on “Errors while Creating ‘Face Blur on Web Cam’ – Python Project

  1. Hey chitranshu.
    I’m Prerna.
    I must say you’ve worked hard with all this.
    I really appreciate your dedication.
    May you get better day day,sec sec in your interested field , undoubtedly which is data science..
    Good luck friend.just do it

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top