MATLAB Image Processing

Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going combine all of my previously published tutorials based on MATLAB Image Processing. Image processing can be defined as to convert an image into digital form and to perform some actions on it to improve its quality. I have published a number of tutorials on MATLAB image processing but they are not well arranged. So, I am going to combine the links for all of them in order to access them easily. All of the projects that I am going to combine today, are designed and compiled by our team with a lot of hard work. A number of MATLAB Image Processing based tutorials are compiled into this single tutorial. These are divided into two different categories i.e free and payable. Some of them are totally free and their source code are easily available to download. Some are not free but we have imposed a low cost on it and the students can easily purchase them even with their pocket money as well. Image processing is an amazing technique now a days and is difficult to do that is why we have imposed a bit cost on some of the major projects. The detailed description of each of the single project based on MATLAB image processing will be given later in this tutorial.

MATLAB Image Processing

Here in the tutorial MATLAB Image Processing, the combined list of all the previously published tutorials will be given in detail along with their accessible links. First of all I would like to explain you a bit about image processing technique.
  • To convert an image into the digitized form and perform some kind of actions on it specially to improve its quality is basically known as image processing technique.
  • The images below display the conversion of an image into digitized form to improve their quality.
  • The image on which I am going to perform some of the actions for its quality improvement is shown in the figure below.
  • Now I am going to perform some of the major actions on it to improve its quality.
  • The figure shown below displays the tasks performed on the above image.
  • So that was a bit about image processing technique.
  • Now, I am going to combine all of my previous tutorials based on MATLAB image processing.

1) Color Detection in Images using MATLAB

This tutorial is about the detection of a specific color among different colors on an image using an amazing tool i.e MATLAB. Color detection becomes necessary sometimes. Like there different cars with same external structure and same specifications but they have different colors. We have to select a red colored car using computerized automated system, to wash it. Here we need to apply an image processing technique to detect the red color among all of the different colors present at a time. In this tutorial I have take an image having red, green and blue colors in it. I have individually detected each of the colors from this image using MATLAB image processing technique.
  • You download the complete simulation here by clicking on the button below.

Download Color Detection in MATLAB using Image Processing

2) Detect Circles in Images using MATLAB

In this tutorial I have explained the methods for the detection of the circles in MATLAB. Its a quite simple technique. The first thing is to choose an image on which the circles are to be detected. Then the second step is the detection of the circles on the selected image. I have used an image of bicycle having two circles i.e. its wheels as shown in the figure on right side. You can see there are two circles in the image. MATLAB finds the circles first and then shows them to us by detecting them. For this figure MATLAB has found both of the wheels and shown us the detected wheels as white and red dotted line on inner surface of both of the wheels of bicycle.
  • You download the complete MATLAB simulation here by clicking on the button below.

Download Detect Circles in Images using MATLAB

3) Image Zooming with Bilinear Interpolation

In this tutorial I have elaborated the technique for the image zooming with bilinear interpolation in MATLAB. Different software e.g. paint and adobe photoshop provides us with the option of zooming the image bu just clicking on the button. In this tutorial I have performed the operation of image zooming in MATLAB using bilinear interpolation. In MATLAB, zooming of an image means that we are increasing the pixels of that image. In order to do so we must have to fill the extra pixels with color of the neighbor pixels. To fill out the extra pixels with some color is usually known as the interpolation. There are a lot of interpolation techniques. I have used a type of linear interpolation named as bilinear interpolation which includes the implementation of interpolation formula on both x and y axis. You can see the further details i.e. interpolation formula and its implementation, for this project by clicking on the button below.
  • You can download the complete MATLAB simulation for image zooming with bilinear interpolation, just here by clicking on the button below.

Download Image Zooming with Bilinear Interpolation

4) Color Detection in MATLAB Live Video

In this tutorial I have made an algorithm for color detection in MATLAB live video. I have taken a live video from my laptop's camera and then I have detected the specific color from the live video. In order to do this task, you must have to install image processing toolbox in your MATLAB. I have detected a red color in this tutorial. You can detect any color you want. You have to made a very small change in the code in order to do so. For this tutorial, you can place anything having red color in it, in front of the camera. Algorithm will detect and encircle the red color in that image. The algorithm in working condition is also shown in the figure on right side.
  • You can download the complete MATLAB simulation for color detection in MATLAB live video, here by just clicking on the button below.

Download Color Detection in MATLAB Live Video

5) Motion Detection in MATLAB

In this tutorial, I have made an algorithm for the detection of the motion in MATLAB. This project can be used as the security purposes. For hardware purpose IR sensor is used to detect the motion in the surroundings. I have used MATLAB software for the motion detection in the real environment instead. I have used a webcam and then applied a simple algorithm in order to detect the motion in the surroundings. I have made GUI having different sections on it. on the first axis the image is to be captured and then you need to press Start Comparison button to visualize the change in surroundings. If any change is occurred in the environment or not, corresponding text will be displayed on the GUI at the bottom right corner of the GUI.
  • You can download the complete MATLAB simulation for Motion Detection in MATLAB, here by just clicking on the button below.

Download Motion Detection in MATLAB

6) Eye Ball Detection in MATLAB

In this project I have designed an algorithm for Eye Ball Detection in MATLAB. I have designed a Graphical User Interface (GUI) to detect the eye balls from the images loaded into the GUI. Our team has worked very hard to design this algorithm. So, I have not share the simulation for this task for free. I have imposed a small amount of cost on it. You can easily buy this project by clicking on the button below. The algorithm is designed in MATLAB 2015 version. So, you must have MATLAB 2015 or its later version because it is not backward compatible. As you run the simulation a GUI will be opened on your screen. You just need to browse the image in which eye balls are needed to be detected. Then press the Load button, you will see that eye balls has been detected successfully as shown in the figure on right side.
  • You can download the complete MATLAB simulation for Eye Ball Detection in MATLAB, here by just clicking on the button below.

Buy Eye Ball Detection in MATLAB

So, that is all from the tutorial MATLAB Image Processing. I hope you all enjoyed this tutorial.If you face any sort of problem, you can ask me freely anytime in comments without even feeling any kind of hesitation. I will try my level best to entertain you and to sort out your issues in some better way, if possible. I will explore this technique further in MATLAB and on the other software as well in my later tutorials. So, till then, Take Care :)

How to use Print MATLAB

Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to share my knowledge about How to use Print MATLAB. As you all know that the design of an algorithm is not enough until we observe its results too. So, there should be a debugging tool in order to check the performance and accuracy of the designed algorithm. Debugging tool helps us to improve the algorithm’s performance and accuracy too by observing its output again and again. In this tutorial I will tell you about using print command in MATLB for different purposes. So, in this tutorial I am going to use print command as a debugging tool in order to observe the output of the algorithm. You should also have a look at how to use MATLAB ? I am going to use print command to either print the desired statement on the command window in MATLAB or to display the graphs on a figure and to automatically save it on any destination wherever you want to. I will elaborate this command with the help of the different examples later in this tutorial. if you new to MATLAB then you should read Introduction to MATLAB. So, now let's have a look at How to use Print MATLAB:

How to use Print MATLAB

In the tutorial How to use Print MATLAB, I will tell you about the use of this command in MATLAB while explaining a lot of examples and by displaying their results. The examples include the printing of the statement on the command window in MATLAB as well as to display the graphs and to save its image.
  • Here, I am going to print some statement (the name of our website) on the command window using this particular command in m.file.
  • The use of the command fprintf is shown below.
clc % clears the command window
fprintf('www.TheEngineeringProjects.com\n')% prints the desired statement
  • Editor also displays that command in the figure shown below.
  • You can observe the result of this statement on the command window in MATLAB.
  • The result displayed on the command window is shown in the figure below.
  • So, that was about how to print the statement on the command window.
  • Now, I am going to print the result of some mathematical operations applied on some variables, on command window using the same command.
  • I have assigned different values to the two variables a and
  • I have calculated their sum and displayed on the command window.
  • The commands written on the editor are shown in the figure below.
  • The result of the above commands displayed on the command window is shown in the figure below.
  • So, that was the description of how to print the results mathematical operations applied on some variables on command window.
  • Now, I am going to perform some operations on matrix.
  • The source code written in editor of the MATLAB is shown below.
  • I have initialized a matrix named as
  • I have then displayed that matrix on the command window.
  • At the end, I have printed all the values of that matrix on the command window.
  • The result of all the above commands displayed on the command window is shown in the figure below.
  • First row in the above figure displays the matrix.
  • And the second row prints each value of the matrix in next ling using \n.
Graphics Format File
  • You need to specify file name and format switch to save your figure as graphics.
  • The supported output formats for exporting from MATLAB and switch settings are shown in the table given below.
Print Paper Copy of Figure
In this method a new bar chart will be created and printed to your system default computer. If you do not specify the figure to be printed, then print will use the current figure.
  • The source code written on the editor is shown below.
clc
bar(1:10);
print 
  • The editor window with the code is also shown in the figure below.
  • The figure generated from the above code is shown below.
  • That was the detailed discussion about using print command as a debugging tool in MATLAB.
So, that is all from the tutorial How to use Print MATLAB. I hope you enjoyed this tutorial. If you face any sort of problems regarding anything, you can ask me freely in comments every time, without even feeling any kind of hesitation. I will try my level best to solve your issues in a better way, if possible. There's another interesting MATLAB Projects named as Eye Ball Detection in MATLAB. I will explore different software including MATLAB in my next tutorials and will share all of them with you guys as well. So, till then, take care :)
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir