Use of Data Structures in Image Processing

Data structures are the widely used and in other words, we can say are the building blocks of any computer application, be it websites, blockchain, mobile applications, artificial intelligence, or machine learning, all these fields include the usage of the concepts of data structures for the development.

So, what exactly are data structures? The simple answer to this question is “data structure is a method, by which we can easily organize and store the data so that it can be accessed and manipulated easily in the future.”  There are different types of data structures, which are used in computer science, the most common data structures are as follows:

Arrays: Array is one of the simplest data structure, which stores the data in the continuous memory location.

Linked Lists: Linked Lists are the type of data structures, in which each node points to the next node/ element in the list, or in other words, we can say that each node stores the address of the next node.

Stack: Stack is a data structure, which follows the rule of First In Last Out (FILO), which means that the element, which is inserted first will be removed/deleted at last and the element, which was last in the list is removed first.

Queue: Queue is a data structure, which follows the rule of First In First Out (FIFO), which means that the element, which is inserted first will be removed/deleted first and the element, which was last in the list is removed at last.

Tree: Trees are a type of hierarchical data structure, where each node has parent node and may or may not have a child node. Trees are a type of graphs.

Graph: Graph is also a type of hierarchical data structure, where each node has parent node and may or may not have a child node. The main difference between graphs and trees is that graphs can contain a cycle but, trees cannot.

Hash Tables: Hash tables are the types of data structures, which uses the concepts of hash functions to map the keys with their respective values.

Now, before looking at the usage of data structures in image processing, let us get an overview of what is image processing and when and how it is being used today’s era of artificial intelligence and machine learning. So, the Image processing can easily be understood as the combination of two distinct terms “Image” and “Processing”. An image is a visual representation of anything or anyone and the term “processing” means to treat something or to deal with data. Hence, “the term Image Processing means to deal or treat the data in an image”. Image Processing is the process, by which the user analyses and manipulate the digitalized images. It is a way to convert an image into digital aspect and perform certain tasks on it to extract the meaningful data from the given image.

Nowadays, image processing and computer vision are being used in different spheres such as it is being used for the automatic detection of diseases from the images obtained from scans, images are also used for controlling the traffic on the roads and most importantly, these are used for object detection and other.

Data Structures are an essential tools, which are used in image processing, which helps in storing, manipulating and ultimately in the analysis of images. Different data structures and their use cases in image processing are as follows:

Arrays: Image is considered to be a 2x2 matrix or in other words as a 2 dimensional matrix, which contains the values of pixels ranging from 0 to 255.

Linked Lists: Linked lists are used to store and manage the image pixel sets or the features extracted.

Trees: Different types of trees such as Decision trees are used for image segmentation and classification.

Stacks and Queues: Both stack and queue are used is image processing algorithms, which requires pixel processing in a specific order such as depth first search or the breadth first search.

Graphs: Graphs data structure in image processing are used to represent the relationship between pixels and regions, which are used for the image segmentation. Different graph-based algorithms are used for the image segmentation and recognition.

So, concept of data structure is the fundamentals of image processing as image itself is a data structure and without an image, image processing cannot be performed. Moreover, different algorithms used in image processing for segmentation and feature extraction uses different types of data structures such as hash maps and graphs. Not only this, different sorting and searching algorithms, which are used to sort any list or search in the list are also used in the image processing for the tasks such as object based recognition, classification and segmentation. Sorted list of pixels based on the intensity are used to separate the foreground and background region in an image. Hence, these sorting and searching algorithms plays a crucial role in the pre-processing, segmentation and feature extraction phases of the image processing.

From the above text, it is clear that data structures are the basic and most important tools for working in any sphere, which uses the computer fundamentals. Different data structures and algorithms have different use cases in image processing, which are discussed above in the text.

To view or add a comment, sign in

More articles by Hermehar Pal Singh Bedi

  • Large Language Models: Next Gen Doctors

    I have often listened from the general public and specially the doctors that Artificial Intelligence (AI) can replace…

    10 Comments

Others also viewed

Explore content categories