All Projects → bholagabbar → capsnap

bholagabbar / capsnap

Licence: other
OpenCV tool that combines image processing algorithms to remove black-bar caption filters from Snapchat images

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to capsnap

Image deionising auto encoder
Noise removal from images using Convolutional autoencoder
Stars: ✭ 34 (+30.77%)
Mutual labels:  opencv-python
opencv-python-inference-engine
Wrapper package for OpenCV with Inference Engine python bindings.
Stars: ✭ 32 (+23.08%)
Mutual labels:  opencv-python
vidpipe
Video data processing pipeline using OpenCV
Stars: ✭ 33 (+26.92%)
Mutual labels:  opencv-python
Snapchat-Snap-Kit-DIY-Docs
No description or website provided.
Stars: ✭ 16 (-38.46%)
Mutual labels:  snapchat
Realtime-OpenCV-Chess
♔ Chess-playing with Open-CV [Human vs AI (Stockfish engine)]
Stars: ✭ 18 (-30.77%)
Mutual labels:  opencv-python
accessibility-buttons
Buttons to add/remove contrast and increase/decrease font size.
Stars: ✭ 61 (+134.62%)
Mutual labels:  contrast
opencv-proto
Allows fast prototyping in Python for OpenCV
Stars: ✭ 18 (-30.77%)
Mutual labels:  opencv-python
flutter-webrtc python-aiortc-opencv
Flutter WebRTC demo with Python server to perform image processing on video frames using OpenCV
Stars: ✭ 34 (+30.77%)
Mutual labels:  opencv-python
UAV-Stereo-Vision
A program for controlling a micro-UAV for obstacle detection and collision avoidance using disparity mapping
Stars: ✭ 30 (+15.38%)
Mutual labels:  opencv-python
Insta flters with python
With this program you can add hat & glass on your face(it's support multiple faces)
Stars: ✭ 21 (-19.23%)
Mutual labels:  opencv-python
Face-Detection-and-Tracking
Computer Vision model to detect face in the first frame of a video and to continue tracking it in the rest of the video. This is implemented in OpenCV 3.3.0 and Python 2.7
Stars: ✭ 24 (-7.69%)
Mutual labels:  opencv-python
BlurryFaces
A tool to blur faces or other regions in images and videos 🤡🔍
Stars: ✭ 58 (+123.08%)
Mutual labels:  opencv-python
DJITelloOpticalControl
Autonomous navigation and data collection for Tello using mainly OpenCV's ArUco libraries.
Stars: ✭ 24 (-7.69%)
Mutual labels:  opencv-python
britishMuseumFacesDetection
A python example for using OpenCV to identify faces within @BritishMuseum images.
Stars: ✭ 66 (+153.85%)
Mutual labels:  opencv-python
Pixel-Processing
📷 This repository is focused on having various feature implementation of OpenCV in Python. The aim is to have a minimal implementation of all OpenCV features together, under one roof.
Stars: ✭ 122 (+369.23%)
Mutual labels:  opencv-python
camera calibration
Code and resources for camera calibration using arUco markers and opencv
Stars: ✭ 38 (+46.15%)
Mutual labels:  opencv-python
react-native-snapchat-clone
Just a simple Snapchat clone made to learn React Native the hard way 🤓
Stars: ✭ 42 (+61.54%)
Mutual labels:  snapchat
WoW Fishing Bot
Fishing bot written in Python3.6
Stars: ✭ 15 (-42.31%)
Mutual labels:  opencv-python
boxdetect
BoxDetect is a Python package based on OpenCV which allows you to easily detect rectangular shapes like character or checkbox boxes on scanned forms.
Stars: ✭ 46 (+76.92%)
Mutual labels:  opencv-python
Invisible-Cloak-And-Magic-Wand-using-OpenCV
This is one of my OpenCV that is Computer Vision project named in vi . That is inspired from Harry potter Invisible Cloak
Stars: ✭ 16 (-38.46%)
Mutual labels:  opencv-python

CapSnap

CapSnap is a tool to remove captions off Snapchat images and restore the original image.

Work still in progress.

Comparision of Original and Corrected Image

image

How it works

  1. The image is read an converted to B/W to execute operations upon
  2. We then find the black bars of the caption to be replaced using Hough Line Transform. We check the conditions where the line returned by this transform has cos(theta) = 0 which implies that the edge is perfectly horizonatal. Credits to a SO answer here
  3. After we have the black caption bar, we simply extract that part out from the image to work upon. This reduces the load on the algorithms
  4. This caption bar has Contrast Enhancement applied on it so that the text comes out upfront and should be easy to inpaint. We use the principle that every pixel can be transformed as X = aY + b where a and b are scalars and control the contrast and brightness. Have a look at the reference article on SO here.
  5. Having gotten the text now, we simply apply Binary Thresholding to obtain the mask for Inpainting the text.
  6. After inpainting the text, we have tried and reconstructed that part of the image hidden away behind the text. Now, we multiply every pixel value in this black caption bar by a constant 2.52/2.42 to attempt and restore the original color of the image.
  7. Having done this, we finally inpaint over the edges of the image obtained after recoloring the image. This should ensure a smooth and uniform image as the output.
  8. The final image with a removed caption is obtained.

Steps described are shown below

image

Usage

Dependencies: cv, numpy, matplotlib, argparse

To run: python capsnap.py --img /pathtoimage/imagename.format

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].