Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
Auto Cropping- Based on Labeling the Connected Components using MATLAB
Next article icon

Matlab | Erosion of an Image

Last Updated : 30 Nov, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

Morphology is known as the broad set of image processing operations that process images based on shapes. It is also known as a tool used for extracting image components that are useful in the representation and description of region shape. 

The basic morphological operations are: 

  • Erosion 
  • Dilation

In this article, we will be discussing Erosion.

Erosion:

  • Erosion shrink-ens the image pixels i.e. it is used for shrinking of element A by using element B.
  • Erosion removes pixels on object boundaries.:
  • The value of the output pixel is the minimum value of all the pixels in the neighborhood. A pixel is set to 0 if any of the neighboring pixels have the value 0.

Approach: 

  • Read the RGB image.
  • Using function im2bw(), convert the RGB image to a binary image.
  • Create a structuring element or you can use any predefined mask eg. special(‘sobel’).
  • Store the number of rows and columns in an array and loop through it.
  • Create a zero matrix of the size same as the size of our image.
  • Leaving the boundary pixels start moving the structuring element on the image and start comparing the pixel with the pixels present in the neighborhood.
  • If the value of the neighborhood pixel is 0, then change the value of that pixel to 0.

Example: 

MATLAB




% Matlab code for Erosion
% read image
I=imread('lenna.png');  
 
% convert to binary 
I=im2bw(I);
 
% create structuring element             
se=ones(5, 5);
 
% store number of rows
% in P and number of columns in Q.           
[P, Q]=size(se);
 
% create a zero matrix of size I.       
In=zeros(size(I, 1), size(I, 2));
 
for i=ceil(P/2):size(I, 1)-floor(P/2)
    for j=ceil(Q/2):size(I, 2)-floor(Q/2)
 
        % take all the neighbourhoods.
        on=I(i-floor(P/2):i+floor(P/2), j-floor(Q/2):j+floor(Q/2));
 
        % take logical se
        nh=on(logical(se));
       
        % compare and take minimum value of the neighbor
        % and set the pixel value to that minimum value.
        In(i, j)=min(nh(:));     
    end
end
 
imshow(In);
 
 

Output:
 

figure: Input image

figure: Output Image

Let’s take another image to perform Erosion and here we use different MATLAB functions.

Syntax:

  • imread() function is used to read the image.
  • strel() function is used to define the structuring element. We have chosen disk-shaped SE, of radius 5.
  • imerode() function is used to perform the erosion operation.
  • imtool() function is used to display the image.

Example:

Matlab




% MATLAB code for Erison
% read the image.
k=imread("erosion.png");
 
%define the structuring element.
SE=strel('disk',5);
 
%apply the erosion operation.
e=imerode(k,SE);
 
%display all the images.
imtool(k,[]);
imtool(e,[]);
 
%see the effective reduction in org,image
imtool(k-e,[]);
 
 

Output:

Figure: Left: Original image, Right: Eroded image

Figure: Output image

Code explanation:

  • k=imread(“erosion_exmp.png”); this line reads the image.
  • SE=strel(‘disk’,5); this line defines the structuring element.
  • e=imerode(k,SE); this line applies the erosion operation.
  • imtool(k,[]); this line displays the original image.
  • imtool(e,[]); this line displays the eroded image.
  • imtool(k-e,[]); this line shows the effective reduction in original image.

The last image shows the extent to which the original image got eroded. We have used the Structuring element of disk-shaped and the image we used is also circular in shape. This gives us the very desired output to understand erosion.



Next Article
Auto Cropping- Based on Labeling the Connected Components using MATLAB

K

kanugargng
Improve
Article Tags :
  • Computer Subject
  • MATLAB
  • Image-Processing
  • MATLAB

Similar Reads

  • Digital Image Processing Tutorial
    In this tutorial, we will learn all about Digital Image Processing or DIP which is a subcategory of signal processing that particularly deals with the manipulation of digital images by using a digital computer. It is based on the principle of the I-P-O cycle, where it will take a digital image as an
    13 min read
  • Introduction to Digital Image Processing

    • Digital Image Processing Basics
      Digital Image Processing means processing digital image by means of a digital computer. We can also say that it is a use of computer algorithms, in order to get enhanced image either to extract some useful information. Digital image processing is the use of algorithms and mathematical models to proc
      7 min read

    • What is a Pixel?
      A pixel is the smallest unit of a digital image or display and stands for “picture element.” It is a very small, isolated dot that stands for one color and plays the most basic part in digital images. Pixels when combined help to create the mosaic of colors and shapes contributing towards visual con
      10 min read

    Image Conversion

    • MATLAB | RGB image representation
      RGB image can be viewed as three different images(a red scale image, a green scale image and a blue scale image) stacked on top of each other, and when fed into the red, green and blue inputs of a color monitor, it produces a color image on the screen. RGB color model is the model in which Red, Blue
      4 min read

    • How to Convert RGB Image to Binary Image Using MATLAB?
      An Image, by definition, is essentially a visual representation of something  that depicts or records visual perception. Images are classified in one of the three types.  Binary ImagesGrayscale ImagesColor ImagesBinary Images: This is the most basic type of image that exists. The only permissible pi
      3 min read

    • YIQ Color Model in Computer Graphics
      During the early days of color television, black-and-white sets were still expected to display what were originally color images. YIQ model separated chrominance from luminance. Luminance information is contained on the Y-channel, whereas color information is carried on I and Q channels (in-phase an
      2 min read

    • How to Convert YIQ Image to RGB Image Using MATLAB?
      Converting images from one color space to another is a handy process in image processing that provides convenience and eases the overall process by choosing the most accurate color space to work the image on. The YIQ color space, as the name suggests comprises of three components namely Luma (Y), In
      4 min read

    • How to Convert RGB Image to YIQ Image using MATLAB?
      Image Processing in MATLAB use functions from the Image Processing Toolbox. This toolbox generally represents colors as RGB numeric values. Different models also exist for representing colors numerically. The official term for these models is "color spaces" and is coined from the definition of a vec
      2 min read

    • MATLAB | RGB image to grayscale image conversion
      An RGB image can be viewed as three images( a red scale image, a green scale image and a blue scale image) stacked on top of each other. In MATLAB, an RGB image is basically a M*N*3 array of colour pixel, where each colour pixel is a triplet which corresponds to red, blue and green colour component
      4 min read

    • MATLAB | Change the color of background pixels by OTSU Thresholding
      MATLAB also called Matrix Laboratory is a numerical computing environment and a platform for programming language. it was designed and developed by MathWorks. MATLAB is a framework that allows you to perform matrix manipulations, implementing algorithms, plotting functions and data, creating user-in
      2 min read

    • How to Converting RGB Image to HSI Image in MATLAB?
      Converting the color space of an image is one of the most commonly performed operations in Image Processing. It is used so much as a lot of transformation/filters are performed on a specific color mode of an image. i.e. Thresholding is performed in Grayscale, Color slicing in HSV etc. A color space
      2 min read

    • How to Convert HSI Image to RGB Image in MATLAB?
      HSI stands for Hue Saturation Intensity. HSI is color space, it provides a way of numeric to readout the image that is corresponding to the color name contained. RGB it's basically called the RGB triplet. in MATLAB the RGB image is a kind of  MxNx3 M cross N cross 3 arrays of colors pixel which is u
      3 min read

    • How to Partially Colored Gray Image in MATLAB?
      Partially colored images are a common way of enhancing the objects within the image. It is sometimes used as a tool to emphasize the presence of certain objects within the scene. And the processing required to create one is negligible, in contrast to the effect it produces. In this article you will
      3 min read

    • HSV Color Model in Computer Graphics
      A color model is a multidimensional representation of the color spectrum. The most relevant color spectrums are RGB, HSV, HSL and CMYK. A color model can be represented as a 3D surface (e.g. for RGB) or go into much higher dimensions (such as CMYK). By adjusting the parameters of these surfaces, we
      2 min read

    • How to Color Slicing Using HSV Color Space in MATLAB?
      Color slicing is a technique in image processing, which lets us separate certain objects from their surroundings. Furthermore, it works by filtering through only a certain band of the color spectrum, essentially erasing all other colors beyond it. In this article, you will learn how to perform color
      4 min read

    Image Filtering Techniques

    • Spatial Filtering and its Types
      Spatial Filtering technique is used directly on pixels of an image. Mask is usually considered to be added in size so that it has specific center pixel. This mask is moved on the image such that the center of the mask traverses all image pixels. Classification on the basis of Linearity There are two
      3 min read

    • Frequency Domain Filters and its Types
      Frequency Domain Filters are used for smoothing and sharpening of image by removal of high or low frequency components. Sometimes it is possible of removal of very high and very low frequency. Frequency domain filters are different from spatial domain filters as it basically focuses on the frequency
      2 min read

    • How to Remove Salt and Pepper Noise from Image Using MATLAB?
      Impulse noise is a unique form of noise that can have many different origins. Images are frequently corrupted through impulse noise due to transmission errors, defective memory places, or timing mistakes in analog-to-digital conversion. Salt-and-pepper noise is one form of impulse noise that can cor
      4 min read

    • How to Decide Window Size for a Moving Average Filter in MATLAB?
      A moving average filter is a widely used technique for smoothing data in signal processing. It is used to reduce the amount of noise in a given signal and to identify trends in the data. In MATLAB, the window size of a moving average filter is an important parameter that determines how much data is
      3 min read

    • Noise Models in Digital Image Processing
      The principal source of noise in digital images arises during image acquisition and transmission. The performance of imaging sensors is affected by a variety of environmental and mechanical factors of the instrument, resulting in the addition of undesirable noise in the image. Images are also corrup
      3 min read

    • How to Apply Median Filter For RGB Image in MATLAB?
      Filtering by definition is the process of enhancing or modifying an image by applying some method or algorithm over a small area and extending that algorithm over all the areas of the image. Since we apply the methods over an area, filtering is classified as a neighboring operation.  Filters are ess
      2 min read

    • How to Linear Filtering Without Using Imfilter Function in MATLAB?
      Edges can be sharpened, random noise can be reduced, and uneven illuminations can be corrected using a linear filtering technique. Correlating the image with the proper filter kernel completes the process. The imfilter function calculates the value of each output pixel using double-precision floatin
      3 min read

    • Noise addition using in-built Matlab function
      Noise in an image: Digital images are prone to various types of noise that makes the quality of the images worst. Image noise is random variation of brightness or color information in the captured image. Noise is basically the degradation in image signal caused by external sources such as camera. Im
      3 min read

    • Adaptive Filtering - Local Noise Filter in MATLAB
      On the degraded image, which contains both the original image and noise, an adaptive filter is applied. With a predetermined mxn window region, the mean and variance are the two statistical measures on which a locally adaptive filter depends.  Adaptive Filters:adaptive filters are also Digital filte
      4 min read

    • Difference between Low pass filter and High pass filter
      IntrWhen it comes to processing signals, filtering is a key aspect that helps in shaping the characteristics of the signal. Low-pass and high-pass filters are two commonly used types of filters that work in opposite ways to filter signals. Low-pass filters, as the name suggests, allow low-frequency
      3 min read

    • MATLAB - Butterworth Lowpass Filter in Image Processing
      In the field of Image Processing, Butterworth Lowpass Filter (BLPF) is used for image smoothing in the frequency domain. It removes high-frequency noise from a digital image and preserves low-frequency components. The transfer function of BLPF of order [Tex]n[/Tex] is defined as- [Tex]H(u, v)=\frac{
      3 min read

    • MATLAB - Ideal Lowpass Filter in Image Processing
      In the field of Image Processing, Ideal Lowpass Filter (ILPF) is used for image smoothing in the frequency domain. It removes high-frequency noise from a digital image and preserves low-frequency components. It can be specified by the function- [Tex] $H(u, v)=\left\{\begin{array}{ll}1 & D(u, v)
      3 min read

    • MATLAB | Converting a Grayscale Image to Binary Image using Thresholding
      Thresholding is the simplest method of image segmentation and the most common way to convert a grayscale image to a binary image.In thresholding, we select a threshold value and then all the gray level value which is below the selected threshold value is classified as 0(black i.e background ) and al
      3 min read

    • Laplacian of Gaussian Filter in MATLAB
      The Laplacian filter is used to detect the edges in the images. But it has a disadvantage over the noisy images. It amplifies the noise in the image. Hence, first, we use a Gaussian filter on the noisy image to smoothen it and then subsequently use the Laplacian filter for edge detection. Dealing wi
      4 min read

    • What is Upsampling in MATLAB?
      In this article, we will see Upsampling in MATLAB. As we know that upsampling is the process of increasing the sampling rate, i.e, increasing the number of samples. When an upsampling functions on a series of samples of a signal or other continued function, it has an estimation of the row that would
      4 min read

    • Upsampling in Frequency Domain in MATLAB
      Upsampling" is the process of inserting zero-valued samples between original samples to increase the sampling rate. (This is called "zero-stuffing".) Upsampling adds to the original signal undesired spectral images which are centered on multiples of the original sampling rate. In Frequency domain ,
      4 min read

    • Convolution Shape (full/same/valid) in MATLAB
      Convolution is a mathematical operation. It is used in Image processing in MatLab. A mask/filter is used to convolve an image for image detection purposes. But MatLab offers three types of convolution. Here we shall explain the simple convolution. The filter slides over the image matrix from left to
      6 min read

    • Linear Convolution using C and MATLAB
      A key concept often introduced to those pursuing electronics engineering is Linear Convolution. This is a crucial component of Digital Signal Processing and Signals and Systems. Keeping general interest and academic implications in mind, this article introduces the concept and its applications and i
      8 min read

    Histogram Equalization

    • Histogram Equalization in Digital Image Processing
      A digital image is a two-dimensional matrix of two spatial coordinates, with each cell specifying the intensity level of the image at that point. So, we have an N x N matrix with integer values ranging from a minimum intensity level of 0 to a maximum level of L-1, where L denotes the number of inten
      6 min read

    • Histogram Equalization Without Using histeq() Function in MATLAB
      Histogram Equalization is the most famous contrast management technique for digital image processing with different image data intensity level values. or we can say it's a Pixels brightness transformations technique.  The histogram is basically a graph-based representation method that clarifies the
      4 min read

    • MATLAB | Display histogram of a grayscale Image
      An image histogram is chart representation of the distribution of intensities in an Indexed image or grayscale image. It shows how many times each intensity value in image occurs. Code #1: Display histogram of an image using MATLAB library function. % Read an Image in MATLAB Environment img=imread('
      2 min read

    • What Color Histogram Equalization in MATLAB?
      A Histogram is a graph-based representation technique between a number of pixels and intensity values. it is a plot of the frequency of occurrence of an event. So in this article, we will understand how we generate the and Equalize Histogram of a color image.  Histogram EqualizationHistogram Equaliz
      5 min read

    • Histogram of an Image
      The histogram of a digital image with gray levels in the range [0, L-1] is a discrete function. Histogram Function:   Points about Histogram:   Histogram of an image provides a global description of the appearance of an image.Information obtained from histogram is very large in quality.Histogram of
      2 min read

    Object Identification and Edge Detection

    • Functions in MATLAB
      Methods are also popularly known as functions. The main aim of the methods is to reuse the code. A method is a block of code which is invoked and executed when it is called by the user. It contains local workspace and independent of base workspace which belongs to command prompt. Let's take a glance
      5 min read

    • Program to determine the quadrant of the cartesian plane
      Given co-ordinates (x, y), determine the quadrant of the cartesian plane. Image_source : wikipedia.org Examples : Input : x = 1, y = 1 Output : lies in 1st quadrant Input : x = 0, y = 0 Output : lies at origin There are 9 conditions that needs to be checked to determine where does the points lies -
      6 min read

    • How To Identifying Objects Based On Label in MATLAB?
      labeling means identifying and placing labels on each program of an object project in the image. in Binary image, it's classified as 4-connected and 8-connected. for performing the labeling in MATLAB we use the Built-in function bwlabel() used to label the object in the binary image. So, In this art
      4 min read

    • What is Image shading in MATLAB?
      As the name suggests, Image shading means modifying the original image into its sharpened form by detecting the edges of the image. Here two words are combined to define a process one is "image" which means picture and another word is "Shading" which is defined as a process of redrawing or modifying
      3 min read

    • Edge detection using in-built function in MATLAB
      Edge detection: In an image, an edge is a curve that follows a path of rapid change in intensity of that image. Edges are often associated with the boundaries of the object in a scene environment. Edge detection is used to identify the edges in an image to make image processing easy. Edge detection
      2 min read

    • Digital Image Processing Algorithms using MATLAB
      Like it is said, "One picture is worth more than ten thousand words "A digital image is composed of thousands and thousands of pixels. An image could also be defined as a two-dimensional function, f(x, y), where x and y are spatial (plane) coordinates and therefore the amplitude of f at any pair of
      8 min read

    • MATLAB - Image Edge Detection using Sobel Operator from Scratch
      Sobel Operator: It is a discrete differentiation gradient-based operator. It computes the gradient approximation of image intensity function for image edge detection. At the pixels of an image, the Sobel operator produces either the normal to a vector or the corresponding gradient vector. It uses tw
      3 min read

    • Image Complement in Matlab
      Prerequisite: RGB image representationMATLAB stores most images as two-dimensional matrices, in which each element of the matrix corresponds to a single discrete pixel in the displayed image. Some images, such as truecolor images, represent images using a three-dimensional array. In truecolor images
      2 min read

    • Image Sharpening Using Laplacian Filter and High Boost Filtering in MATLAB
      Image sharpening is an effect applied to digital images to give them a sharper appearance. Sharpening enhances the definition of edges in an image. The dull images are those which are poor at the edges. There is not much difference in background and edges. On the contrary, the sharpened image is tha
      4 min read

    • Edge detection using in-built function in MATLAB
      Edge detection: In an image, an edge is a curve that follows a path of rapid change in intensity of that image. Edges are often associated with the boundaries of the object in a scene environment. Edge detection is used to identify the edges in an image to make image processing easy. Edge detection
      2 min read

    PhotoShop Effects in MATLAB

    • What is Swirl Effect in MATLAB?
      In Matlab, the Swirl Effect is a type of Photoshop effect. Image processing has made extensive use of the swirl effect. It is advantageous for those with expertise in image processing because both the image and the fundamental component of the swirl effect are matrices. The swirl effect simplifies i
      2 min read

    • What is Oil Painting in MATLAB?
      In this era of information and intelligence, it seems that painting graphics have been seriously marginalized, which also produced how to better develop painting technology in modern society. Nowadays, in this field, digital image processing plays important role in the expansion of oil painting crea
      3 min read

    • Cone Effect in MATLAB
      MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. With the help of this software, we can also give the cone effect to an image. It is done by using the image's midpoint. After this, we
      2 min read

    • What is Glassy Effect in MATLAB?
      MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. With the help of this software, we can also give the glassy effect to an image. It is done by replacing each pixel value in the image
      2 min read

    • What is Tiling Effect in MATLAB?
      MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. With the help of this software, we can provide a tiling effect to an image. It is done by breaking the original image and then allocat
      2 min read

    Image Geometry, Optical Illusion and Image Transformation

    • Matlab program to rotate an image 180 degrees clockwise without using function
      An image is defined as two-dimensional function, f(x, y), where x and y are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates(x, y) is called the Intensity or the Gray level of the image at that point. When x, y and the intensity values of f are all finite, discrete quan
      2 min read

    • Image Resizing in Matlab
      Prerequisite : RGB image representation MATLAB stores most images as two-dimensional matrices, in which each element of the matrix corresponds to a single discrete pixel in the displayed image. Some images, such as truecolor images, represent images using a three-dimensional array. In truecolor imag
      2 min read

    • Matlab program to rotate an image 180 degrees clockwise without using function
      An image is defined as two-dimensional function, f(x, y), where x and y are spatial (plane) coordinates, and the amplitude of f at any pair of coordinates(x, y) is called the Intensity or the Gray level of the image at that point. When x, y and the intensity values of f are all finite, discrete quan
      2 min read

    • Nearest-Neighbor Interpolation Algorithm in MATLAB
      Nearest neighbor interpolation is a type of interpolation. This method simply determines the "nearest" neighboring pixel and assumes its intensity value, as opposed to calculating an average value using some weighting criteria or producing an intermediate value based on intricate rules. Interpolatio
      3 min read

    • Black and White Optical illusion in MATLAB
      MATLAB provides many toolboxes for different applications. The Image Processing Toolbox is one of the important toolboxes in MATLAB. The Black and White optical illusion in MATLAB happens when we compliment the pixel values in a black and white image and after staring at the center of the resultant
      2 min read

    • MATLAB | Complement colors in a Binary image
      Binary image is a digital image that has only two possible value for each pixel - either 1 or 0, where 0 represents white and 1 represents black. In the complement of a binary image, the image pixel having value zeros become ones and the image pixel having value ones become zeros; i.e white and blac
      3 min read

    • Discrete Cosine Transform (Algorithm and Program)
      Image Compression : Image is stored or transmitted with having pixel value. It can be compressed by reducing the value its every pixel contains. Image compression is basically of two types : Lossless compression : In this type of compression, after recovering image is exactly become same as that was
      11 min read

    • 2-D Inverse Cosine Transform in MATLAB
      The 2-D inverse cosine transform is used to decode an image into the spatial domain, which is a more suitable data representation for compression (ICT). ICT-based decoding is the foundation for standards for image and video decompression. or, to put it another way, we can say that the inverse cosine
      2 min read

    • MATLAB - Intensity Transformation Operations on Images
      Intensity transformations are among the simplest of all image processing techniques. Approaches whose results depend only on the intensity at a point are called point processing techniques or Intensity transformation techniques. Although intensity transformation and spatial filtering methods span a
      4 min read

    • Fast Fourier Transformation for polynomial multiplication
      Given two polynomial A(x) and B(x), find the product C(x) = A(x)*B(x). There is already an O([Tex]n^2 [/Tex]) naive approach to solve this problem. here. This approach uses the coefficient form of the polynomial to calculate the product.A coefficient representation of a polynomial [Tex]A(x)=\sum_{j=
      13 min read

    • Gray Scale to Pseudo Color Transformation in MATLAB
      The principle behind the pseudo color transformation is to map the intensity value in the image to the result of three distinct transformations—RED, BLUE, and GREEN—on a grayscale or intensity image. Now we can see an example of this procedure using Matlab. Example 1: [GFGTABS] Matlab % READ A IMAGE
      1 min read

    • Piece-wise Linear Transformation
      Piece-wise Linear Transformation is type of gray level transformation that is used for image enhancement. It is a spatial domain method. It is used for manipulation of an image so that the result is more suitable than the original for a specific application. Some commonly used piece-wise linear tran
      2 min read

    • Balance Contrast Enhancement Technique in MATLAB
      With this technique, biassed color (Red Green Blue) composition can be fixed. The histogram pattern of the input image is unaffected by changes to the contrast of the image (A). The solution is based on the parabolic function of the input image.  Equation: [Tex] y = a (x - b)2 + c [/Tex] The three i
      1 min read

    Morphologiocal Image Processing, Compression and Files

    • Boundary Extraction of image using MATLAB
      The boundary of the image is different from the edges in the image. Edges represent the abrupt change in pixel intensity values while the boundary of the image is the contour. As the name boundary suggests that something whose ownership changes, in the image when pixel ownership changes from one sur
      3 min read

    • MATLAB: Connected Component Labeling without Using bwlabel or bwconncomp Functions
      A connected component or object in a binary image is a set of adjacent pixels. Determining which pixels are adjacent depends on how pixel connectivity is defined. There are two standard classification connections for 2D images. Connected-4 - Pixels are connected when the edges touch. Two adjacent pi
      3 min read

    • Morphological operations in MATLAB
      Morphological Operations is a broad set of image processing operations that process digital images based on their shapes. In a morphological operation, each image pixel is corresponding to the value of other pixel in its neighborhood. By choosing the shape and size of the neighborhood pixel, you can
      2 min read

    • Matlab | Erosion of an Image
      Morphology is known as the broad set of image processing operations that process images based on shapes. It is also known as a tool used for extracting image components that are useful in the representation and description of region shape. The basic morphological operations are: Erosion DilationIn t
      3 min read

    • Auto Cropping- Based on Labeling the Connected Components using MATLAB
      Auto Cropping Based on labeling the connected components is related to digital image processing. So, In this article, we will discuss the Auto Cropping-Based on labeling the connected components. Before that look at the basic terms which are required in this topic. Auto CroppingIn terms of MATLAB, t
      3 min read

    • Run Length Encoding & Decoding in MATLAB
      Run-length encoding, or RLE, is a straightforward method of lossless data compression in which runs of data, or sequences of data with the same value in many consecutive elements, are stored as a single value and count rather than as the original run.  In other words, RLE ( Run Length coding) is a s
      2 min read

    • Lossless Predictive Coding in MATLAB
      In Lossless Predictive Coding A new pixel value is obtained by finding the difference between the predicted pixel value and the current pixel. In other words, this is The new information of a pixel is defined as the difference between the actual and predicted value of that pixel.   The approach comm
      3 min read

    • Extract bit planes from an Image in Matlab
      Image is basically combination of individual pixel (dots) information. When we write that image is of 620 X 480 size, it means that image has 620 pixel in horizontal direction and 480 pixel in vertical direction. So, altogether there is 620 X 480 pixels and each pixels contains some information abou
      3 min read

    • How to Read Text File Backwards Using MATLAB?
      Prerequisites: Write Data to Text Files in MATLAB Sometimes for some specific use case, it is required for us to read the file backward. i.e. The file should be read from EOF (End of file Marker) to the beginning of the file in reverse order. In this article we would learn how to read a file in back
      3 min read

    • MATLAB - Read Words in a File in Reverse Order
      MATLAB stands for Matrix Laboratory. It is a high-performance language that is used for technical computing. It allows matrix manipulations, plotting of functions, implementation of algorithms, and creation of user interfaces Suppose we are given a text file containing the following words "I STUDY F
      2 min read

    • How to Read Image File or Complex Image File in MATLAB?
      MATLAB is a programming and numeric computing platform used by millions of engineers and scientists to analyze data, develop algorithms, and create models. For Image Reading in MATLAB, we use the image processing toolbox. In this ToolBox, there are many methods such as imread(), imshow() etc. imshow
      2 min read

    Image Coding, Comparison and Texture Features

    • Digital Watermarking and its Types
      Digital Watermarking is use of a kind of marker covertly embedded in a digital media such as audio, video or image which enables us to know the source or owner of the copyright. This technique is used for tracing copyright infringement in social media and knowing the genuineness of the notes in the
      3 min read

    • How To Hide Message or Image Inside An Image In MATLAB?
      MATLAB is a high-performance language that is used for matrix manipulation, performing technical computations, graph plottings, etc. It stands for Matrix Laboratory. With the help of this software, we can also hide a message or image inside an image. Following are the steps to hide an image, which c
      3 min read

    • How to Match a Template in MATLAB?
      Moving the template across the entire image and comparing it to the image's covered window is a process known as "template matching." The implementation of template matching involves two-dimensional convolution. Template matching has different applications and is utilized in such fields as face ackn
      4 min read

    • Grey Level Co-occurrence Matrix in MATLAB
      The use of texture to identify regions of interest in an image is a crucial characteristic. One of Haralick et al.'s earliest approaches to texture feature extraction was Grey Level Co-occurrence Matrices (GLCM)  in the year 1973. Since then, it has been used extensively in a number of texture analy
      4 min read

    • MATLAB - Texture Measures from GLCM
      GLCM stands for Gray Level Co-occurrence Matrix. In image processing, The GLCM function computes how often pairs of pixels with a particular value and in a particular spatial relationship occur in an image, constructs a GLCM, and extracts statistical measures from this matrix to determine the textur
      4 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences