Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Getting Started with OpenCV and Python: Featuring The Martian

Blog post from Twilio

Post Details
Company
Date Published
Author
Megan Speir
Word Count
2,295
Language
English
Hacker News Points
-
Summary

The Martian Helmet Image is overlaid on the selfie using OpenCV's Haar Feature-based Cascade Classifiers to detect faces. The image is resized and padded with a border before being merged with the background using OpenCV's bitwise_and function. The resulting image is then saved back to the original file path, overwriting the original image. A Flask application is also built to handle incoming MMS/SMS requests from Twilio, which sends a selfie to be martianified when received.