6 minutes read

Have you ever wondered how the computer “reads” images, how doctors can see images on computed tomography scans, or how Instagram filters totally change the look of your photos? The answer is digital image processing (DIP). Digital image processing is a technique used to get an enhanced image or extract useful information about it.

The most common examples of digital image processing are Photoshop apps. The input is a digital image and the output is an edited image, for example, it may be black and white, negative, or simply a brighter image. It happens in just one click, but behind this click, there are a lot of different algorithms executed by the device, and this is exactly what image processing is. DIP can be used just for fun in graphic editors, but it is also used in other fields such as machine learning or medicine.

In this topic, you will get a better understanding of what digital images actually are, how we can edit and manage them, and why this field is so important.

Digital image representation

To start understanding digital image representation, you need to know what a pixel is. The term "pixel" is short for "picture element". It is the smallest element of an image. Usually, you cannot see individual pixels because they are so small. Each pixel can be made up of red, blue, and green elements that are used in different combinations and intensities to make millions of different colors. If you want to find out why it is these three colors that make up a pixel, you can check out the educba.com article about the RGB color model. There are many other color systems, but we will focus on RGB.

If we zoom in, we can see that a pixel is typically a tiny square. Is this how the computer sees it? Actually, for a computer, everything is just information, a combination of 1's and 0's on a very low level. Each pixel has RGB (red, green, blue) color components. These components contain the brightness of each color. The brightness is increased or decreased to produce the variety of colors you see on the screen.

Setting all three colors to the least brightness makes the color black, and full brightness makes white. Each pixel has a number of bits used for each color component in a single pixel. For computers, an image is a 2D matrix of pixels. Pixel is a matrix element or cell.

digital image zoomed in to show matrix of pixels

Image processing techniques

You can imagine how many things we can do if we tweak some of the parameters. There are a lot of image processing methods: filtering, negative image, black and white, histogram modification, and more. Each executes different algorithms on the image's pixels to create the desired effect on the image.

One interesting image processing method is a negative image that is used in photo labs. A normal or original image is referred to as positive and an image where all the colors are reversed is called negative. To create a negative image, RGB values (r, g, b) should be replaced by (255-r, 255-g, 255-b) for every pixel.

image processing method called negative image

Digital images may be produced in black and white (bitonal), grayscale, or color.

A bitonal image consists of pixels that can have one of only two colors, which are usually black and white. In a grayscale image, which is used in photography, each pixel consists of only the intensity/brightness information. The difference between bitonal (left photo) and grayscale (right photo) is illustrated below:

bitonal on left photo and grayscale on right photo

Another popular technique used for picture enhancement is histogram modification. Histogram modification can change the image's brightness or contrast, which is a difference between the maximum and minimum pixel intensity in an image.

image processing method called histogram modification

Finally, there is a very popular technique called filtering. Image filtering changes the value of each pixel. The use of different filtering methods allows you to get many kinds of filters, for example, smoothing, sharpening, de-noise, or noise-adding filters.

image processing method called filtering

Image processing use

Why is it so important for you to know more about image processing? Well, it has a big role in your and everyone's life: images are literally everywhere!

One of the most important applications of DIP is definitely the medical field. Medical imaging involves not only doing a scan but also processing the image properly. An unprocessed medical picture usually does not provide all the information necessary for a diagnosis. By enhancing the image and performing certain manipulations to extract information, specialists make sure that even very small abnormalities are noticed and the patient has a better chance of a full recovery.

digital image processing in medical imaging

The real magic happens when image processing is combined with artificial intelligence and machine learning. Google Lens app is one such example. This app can translate text from a photo, scan QR codes, identify animals and plants, and much more.

Finally, you've surely edited your photos at least once in your lifetime. The most common use of digital image processing is graphic editors. DIP techniques allow you to change the contrast or brightness of the pictures as well as apply interesting filters or change the colors.

Conclusion

Digital image representation is a two-dimensional array of pixels. Image processing is a technique used to get an enhanced image or extract useful information about it. There are a lot of different image processing methods, for example, resizing, negative, histogram modification, filtering, and more. Common uses include but aren't limited to medical imaging, artificial intelligence, or graphic editors.

42 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo