Python OpenCV Image Processing – Resize, Blend, Blur, Threshold, Convert

This tutorial is an introduction to the OpenCV library. Learn how to convert color channels, resize, blend, blur, and threshold images in Python. The OpenCV [1] library contains most of the functions we need for working with images. Handling images in programming requires a different intuition than handling text data. An image is made up … Read more

What are the Applications of Graphs in Computer Science?

[Reading time: 9 minutes] Graphs are everywhere. They are used in social networks, the world wide web, biological networks, semantic web, product recommendation engines, mapping services, blockchains, and Bitcoin flow analyses. Furthermore, they’re used to define the flow of computation of software programs, to represent communication networks in distributed systems, and to represent data relationships … Read more

Best 15+ Machine Learning Cheat Sheets to Pin to Your Toilet Wall

Toilet Wall Cheat Sheet

This article compiles for you the 15 best cheat sheets in the web that help you get started with machine learning. If you’re short on time, here are the 15 direct PDF links (open in a new tab): Each cheat sheet link points directly to the PDF file. So don’t lose any more time, and … Read more

A Bird’s-Eye Perspective on Artificial Intelligence–Written by an AI

This article is contributed by our friendly AI from InferKit that uses a deep neural network to generate text automatically. I (human) guided the AI by proposing different subheadings that may be of interest to the reader. Surprisingly, there are many unique perspectives in the article—and some totally wrong “facts”. So, enjoy this fascinating demonstration … Read more

How to Extract Text from Images in Python using OpenCV and EasyOCR

You can extract text from images with EasyOCR, a deep learning-based OCR tool in Python. EasyOCR performs very well on invoices, handwriting, car plates, and public signs. First released in 2007, PyTesseract [1] is the to-go library for extracting text from images. It uses classical computer vision methods to perform optical character recognition (OCR), then … Read more

How to Customize Multiple Subplots in Matplotlib

This article will cover a specific issue that most Python users encounter when using Matplotlib for plotting their graphs. I am talking about defining multiple subplots and being able to access and change their properties individually. In the following sections, we will see how to use the Matplotlib function .subplots() for generating multiple subplots and … Read more

NumPy arange(): A Simple Illustrated Guide

The np.arange() function appears in 21% of the 35 million Github repositories that use the NumPy library! This illustrated tutorial shows you the ins and outs of the NumPy arange function. So let’s get started! What’s the NumPy Arange Function? The np.arange([start,] stop[, step]) function creates a new NumPy array with evenly-spaced integers between start … Read more

How to Plot the Confidence Interval in Python?

Problem Formulation: How to plot the confidence interval in Python? To plot a filled interval with the width ci and interval boundaries from y-ci to y+ci around function values y, use the plt.fill_between(x, (y-ci), (y+ci), color=’blue’, alpha=0.1) function call on the Matplotlib plt module. The first argument x defines the x values of the filled … Read more

Top 10 Python OpenCV Cheat Sheets

Hey Finxters! It is time for another Python Cheat Sheet! As a brief introduction, OpenCV is an open-source computer vision and machine learning software library of programming functions mainly aimed at real-time computer vision. In this article, I am bringing you the best 10 Python cheat sheets on OpenCV. Let me introduce Python OpenCV to … Read more

How to Calculate the Weighted Average of a Numpy Array in Python?

Numpy Weighted Average np.average(array, axis=0, weights=[0.1,0.1,0.8])

Problem Formulation: How to calculate the weighted average of the elements in a NumPy array? Definition weighted average: Each array element has an associated weight. The weighted average is the sum of all array elements, properly weighted, divided by the sum of all weights. Here’s the problem exemplified: Quick solution: Before we discuss the solution … Read more

How to Calculate the Average of a NumPy 2D Array?

NumPy is a popular Python library for data science focusing on arrays, vectors, and matrices. This article introduces the np.average() function from the NumPy library. When applied to a 1D array, this function returns the average of the array values. When applied to a 2D array, NumPy simply flattens the array. The result is the … Read more