This program detects faces from a video input (webcam) and then shows the video output with the estimated fps (frames per second). The program do require OpenCV package for Python to be installed.
Use this package to encrypt messages and embed in QR code, and decode the message back.
$ [sudo] pip install opencv-python
$ [sudo] pip install matplotlib
$ [sudo] pip install numpy
$ [sudo] apt-get install libopencv-dev python-opencv
$ [sudo] apt-get install python3-matplotlib
$ [sudo] apt-get install python-numpy
For other dependencies based on a particular OS please refer to that OS's install command for the aforementioned packages.
$ git clone https://github.com/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV.git
$ [sudo] python setup.py build
$ [sudo] python setup.py install
$ pip install git+https://github.com/somdipdey/FaceDetection_with_HaarCascade_in_Python_OpenCV.git
$ [sudo] python setup.py build
$ [sudo] python setup.py install
You need to use the setup.py build and install commands to build the C extension program to be used in your python program.
$ python detect.py
You can pass extra parameter as True in order to write out the FPS, Compute_FPS, CPU_LOAD, MEMORY_LOAD to an audit.txt file as comma separated values. Example:
$ python detect.py True
The above command will write the FPS, Compute_FPS, CPU_LOAD, MEMORY_LOAD to an audit.txt in the same directory as the program.
Here, FPS is the Frames Per Second of the Video Capture Input (webcam), whereas CPU_LOAD is the Frames Per Second of the computed program after several compute operations are performed. CPU_LOAD is the current load of the CPU in Percentage and MEMORY_LOAD is the current Memory (RAM) load in percentage.