Skip to main content

Posts

Showing posts from January, 2021

Cosmic Techie

Most fascinating SuperPower is to play with Matter and Energy. It is the power to have possession over the Cosmos. To fulfil this desire, programmer play with code and hardware.

WhatsApp Chat Analysis

In this post, we will go through a process to analyze the WhatsApp chat using python. We will use the data from the WhatApp chat text file of a particular chat for analysis. Here, we are going to analyze the WhatsApp chat of a group named "Jujube Enterprises".  Obtain .txt data file from WhatsApp: Open WhatsApp and go to the chat. Export the chat without media. Exported chat from the Group "Jujube Enterprises" is a text file with .txt extension which holds the chat information. The file renamed as "jujube.txt" has data in the format: jujube.txt Required Libraries: Data Frame generation from jujube.txt: We will generate dataframe df using the data from jujube.txt file. The data in the file is to be extracted and used in a way that we can get a data frame with columns: Date, Time, User and Message.   Now we have the data frame, lets check for the unique users in the chat.  There are few messages that has None value as User, we need to remove the None. We ...

Image to Pencil Sketch using Python and OpenCV

In this post, we will go through a program to get a pencil sketch from an image using python and OpenCV.  Step 1:  To use OpenCV, import the library. Step 2: Read the Image. Step 3: Create a new image by converting the original image to grayscale. Step 4: Invert the grayscale image. We can invert images simply by subtracting from 255, as grayscale images are 8 bit images or have a maximum of 256 tones. Step 5: Blur the inverted image using GaussianBlur  method in OpenCV library and invert the blurred image.  Step 6: Divide the grayscale values of the image by the values of image received from step-5 ( Note: We inverted the grayscale image and we blurred this image and then again inverted it ). Diving an image from its smoothened form will highlight the edges and we get the image like Pencil Sketch. Steps Illustration: Code: Execution Output: