Intro to OpenCV with Python

Installation To work with OpenCV from python, you need to install it first: pip install opencv-python Reading Images from file After we import cv2 we can directly work with images like so: import cv2 img = cv2.imread(“doc_brown.png”) For showing the image, it is recommended to use matplotlib import matplotlib.pyplot as plt img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)…

The Normal Distribution

Diving deeper into data science I started to brush up my knowledge about math especially statistics. The Mother of all Distributions The normal distribution was formulated by Carl Friedrich Gauß in 1809 and can be implemented in Python like the following : def normal_distribution_pdf(x, mu=0, sigma=1): sqrt_two_pi = math.sqrt(2*math.pi) return (1 / (sqrt_two_pi * sigma))…