Select Page

 

Latest From My Blog


Art of Technology

Image Processing – Python and OpenCV – Convert Image to Gray Scale

In the past posts we looked at doing some image conversions using arrays and manual steps. All that is fun, it lets us see what is going on inside the black box. However, deadlines and everything else - we don't want to have to reinvent the wheel each time. Thankfully...

Image Processing – Python Generating a Histogram for a Gray Scale Image

What is an image histogram - it is a profile of the occurrences of each gray level present in an image. In the visual example below - we are using a bar graph to visualize it. It starts at 0 and goes to 255, each vertical bar represents the number of times the...

Image Processing – Python Convert Image to Gray Scale – Single Color Channel

In the last post we took a look at averaging the RGB channels to produce a gray scale image. It does require some math division to get the result. If you need a way that is even simpler and faster than averaging - we can extract the values from one of the color...

Image Processing – Python Convert Image to Gray Scale – Average

Let's us look at some ways of converting a color image into a black and white or gray scale image. The most straight forward approach is averaging the three color channels, RGB. GrayValue = (Red + Green + Blue) / 3 You do this for every pixel. It is quick and dirty....

Image Processing – Python Read Image File and Convert into an Array

There are a tons of image already - instead of going though the pain staking process of creating by hand our own images, I am going to use an image I already captured. And yes, it is of my three cats. I am also adding to the collection of cat images on the internet....

Image Processing – Color Image Arrays

Up to this point we have been dealing with Black and White images or Gray Scale images - that can be represented by a 2d array. Array(height, width) In which each element in the array represents one pixel and the level of gray, with 0 being black and 255 being white....

Image Processing – Memory Usage

Something to consider is the memory usage for the images that you will be processing. Given a 100x200 image - black and white. That 100x200 array takes up roughly 20K of ram. If it is a color image, it would be 3 times that - because each color channel (RGB) is...

Python Code – Convert Text File Into an Image

Here is a little fun. Some Python code that will take a text file and turn it into an image. When I say, turn it into an image - I don't mean it will read the text file and make some image from it that we could look at and say… oh the ocean. What it does it convert...

Python Code – Create A Black and White Image using Numpy Array

As you recall - a black and white image can be represented by a 2d array. The below Python code takes a 2 x 5 array (checker board pattern) and using matplot converts it into an image we can see. #%% import matplotlib.pyplot as plt import numpy as np # 2d Image Array...

The White Rabbit

The Gatekeepers

This is an article a wrote a while back. An article I read got me thinking this morning. It was about Epic Games – VS Apple and Google. In which Epic’s game Fortnite has been removed from both online app stores, basically cutting off Epic from roughly, 3.5 billion...

Movement Toward Localized Computing

Is it just me or have you noticed the move toward a central computing model. With AWS, Azure, Google Cloud, etc.. This has been going on for a few years now. Don't get me wrong, it is an affordable way to have data processing, host your application, what ever you want...