Creating cv2 Program That Will Perform Given Task:

Sending E-mail and WhatsApp Message, when face is detected. Launching the EC2 instance, when face is detected.

Akashkale
2 min readJun 25, 2021

What is OpenCV-Python?

OpenCV-Python is a library of Python bindings designed to solve computer vision problems.

Python is a general purpose programming language started by Guido van Rossum that became very popular very quickly, mainly because of its simplicity and code readability. It enables the programmer to express ideas in fewer lines of code without reducing readability.

OpenCV-Python makes use of Numpy, which is a highly optimized library for numerical operations with a MATLAB-style syntax. All the OpenCV array structures are converted to and from Numpy arrays.

Importing some libraries to perform this task.

  1. import cv2
  2. from pywhatkit import sendwhatmsg
  3. import smtplib

When a program recognized face then it will send E-mail and WhatsApp message to me automatically.

Output:

Code to launch the EC2 instance:

Output:

--

--