Nowadays, we often use computers and connected devices. Most of them have an embedded webcam: computers and mobile phones are just a few examples. These cameras are very useful for communicating through social networks. However, this technology shows dangers: some hackers are able to exploit your webcam to spy on you.
The purpose of this article is to raise awareness and make recommendations on the use of web cameras.
To do this, I propose Kivy Camera, an application that recovers the video stream from your webcam to display it on the screen. The application has the following features:
The KivyCam application and its graphical interface are built with the Kivy framework.
Kivy is a cross-platform framework that allows you to create graphical interfaces for Python applications. The advantages of this framework are its power and its simplicity regarding implementation.
Its use in this project is based on a need for simplicity and lightness.
Before going into design, it is good practice to plan the project, even for a small application.
This project was therefore organized through Gantt planning:
The interface of the Kivy Camera application has been designed and implemented with the idea of simplicity in mind:
This interface is enhanced with several buttons where each one corresponds to an action:
Image capture is a feature of the application that allows the user to take instant photographs of his webcam.
By pressing the SCREENSHOT button while capturing the video stream, a capture is saved as an image file in the "screenshots" folder at the root of the application folder.
The prerequisites for launching Kivy Camera are to install, if this is not already the case:
First of all, regardless of your operating system, check that Python has been installed by typing the following command:>
Download a version of Python3 https://www.python.org/downloads/windows/ and install it.>
Python is installed by default on the system. If not installed, install "brew" and install python3 with the following commands:>
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install python
sudo apt-get install python3 sudo apt-get install python3-pip
To test that Python has been installed correctly on the system, we check its version with the command:>
python3 --version pip3 --version pip --version
/* Tout d’abord, pour éviter des problèmes, veuillez à mettre à jour pip : */ python -m pip install --upgrade pip wheel setuptools virtualenv python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.22 kivy_deps.glew==0.1.12 python -m pip install kivy_deps.gstreamer==0.1.17 /* Avec python 3.5+, kivy_deps.angle à la place de glew : */ python -m pip install kivy_deps.angle==0.1.9 python -m pip install kivy==1.11.1
python -m pip install kivy python -m pip install ffpyplayer
Note: You must configure a KIVY_VIDEO=ffpyplayer environment variable before running the application.>
python -m pip install --upgrade --user pip setuptools virtualenv python -m pip install kivy python -m pip install ffpyplayer
Note: for this application, it is necessary to have a Linux with a graphical interface, otherwise kivy will not compile.>
This part may require basic technical skills in Python.
If you want to test the application, I invite you to download the project from the address https://github.com/ValentinDumas/KivyCam.
Once the code has been downloaded from the Github link, open the archive to access the files. You can use the 7zip software to open the archive, downloadable at https://www.7-zip.org. As an alternative to 7zip, we can suggest WinRar, downloadable at https://www.win-rar.com/start.html?&L=10.
To use the application, open a console window (cmd.exe). Then move to the project folder "cd path_to_project_folder". Then execute the following command to launch the application: "python camlayout.py"
The use of this application and webcams in general raises several points related to an ethical dimension.
Access to a private device without the owner's knowledge constitutes a violation of privacy and is a matter of confidentiality and user data protection.
Using the Python language for example, it is possible:
We could go further in the development of the Kivy Camera application by offering: