Found 163 Articles for MATLAB

Create Array of Zeros in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:33:49

154 Views

In MATLAB, the variables are typically stored in the form of a matrix or array. Sometimes, we require a matrix or array of zeros to perform a specific operation. Therefore, MATLAB allows us to create a matrix or array of zeros. For this task, we can use MATLAB's built-in functions or manual methods. In this article, we will learn different methods to create a matrix or array of zero with the help of example programs in MATLAB programming. Array of Zeros using `zeros()` Function in MATLAB MATLAB provides a built-in function named `zeros()` to create a matrix ... Read More

Checkbox in MATLAB App Building

Manish Kumar Saini
Updated on 18-Jul-2023 11:20:13

131 Views

MATLAB provides an integrated app building toolbox that we can use to create a graphical user interface based app without writing any kind of code. Hence, MATLAB allows users to create professional applications by just drag and drop facility. After that the user can write a MATLAB code to define the behavior of the app options. As mentioned above, this article is primarily meant for creating a user interface in the application which provides a list of options from which a user can select any number of choices. This user interface is referred to as checkbox. A checkbox ... Read More

Combine two images in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:07:43

321 Views

MATLAB allows us to combine two images through various methods like image fusion, image join, image concatenate, image overlay, image blending, etc. In this tutorial, we will explore all these techniques of combining two images. Combine Two Image in MATLAB using `imtile()` Function In MATLAB, we can combine two images by using the `imtile()` function. This function allows us to arrange our multiple images in a tiled layout. Syntax To combine two images, the `imtile` function takes the following syntax: img = imtile({img1, img2}, 'GridSize', [1, 2]); Now, let us see the implementation of the ... Read More

Change Background of Color Image into Grayscale in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:23:24

57 Views

We can obtain grayscale color by setting RGB values to 128. This means all color channels will have the same intensity values. The following MATLAB program illustrate the code for changing the background of a color image into grayscale. Example %MATLAB program to demonstrate changing color background into grayscale % Read the input colored image img1 = imread('https://www.tutorialspoint.com/assets/questions/media/14304-1687425236.jpg'); % Display the input color image subplot(1, 2, 1); imshow(img1); title('Original Image'); % Create a binary mask of the background BGMask = img1(:, :, 1) == img1(1, 1, 1) & ... ... Read More

Calculate Complex Conjugate Transpose in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:58:11

146 Views

The Complex Conjugate Transpose is a mathematical operation performed on a matrix of complex numbers. It is also known as Hermitian Transpose of Matrix. In this operation, first the transpose of the matrix is taken and after that the conjugate of each element of the matrix. For example, if a there is a complex matrix M, then the complex conjugate transpose of this matrix will be M* that is obtained by taking transpose of M and then replacing each element with its complex conjugate. The complex conjugate of a complex number is simply determined by changing the sign of ... Read More

Balance Contrast Enhancement Technique in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:00:20

94 Views

In digital image processing, the contrast enhancement is a crucial technique used to improve visual quality of an image. The contrast enhancement technique adjusts the intensities of pixels to increase the range of brightness levels and highlights the differences between bright and dark regions of the image. MATLAB provides various contrast enhancement techniques, but in this article, we will confine our focus to understand the balance contrast enhancement technique, and will see its implementation in MATLAB programming. What is Balance Contrast Enhancement? In MATLAB, the balance contrast enhancement technique is a modern method to improve the contrast ratio ... Read More

Automatically Plot Different Color Lines in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:11:02

272 Views

The different color lines in a plot allows us to plot and distinguish multiple data sets on a same plot area. MATLAB provides various built-in functions to assign different colors to different plot lines automatically. To automatically control the color of plot lines, we can use the following two MATLAB functions: Automatically Plot Different Color Lines using Hold Option In MATLAB programming, we can use the “hold” option to automatically plot different color lines. Syntax hold on; The following MATLAB program explain the use of “hold” function to plot lines of different color. Example % ... Read More

Automatically Maximize an Image in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:14:12

79 Views

MATLAB programming allows us to automatically maximize an image for better visibility. For this, we can use the “figure” function with some arguments which described in the following syntax. Syntax figure('units', 'normalized', 'outerposition', [0 0 1 1]); The “figure” command with all these parameters automatically maximizes an image. The following MATLAB program demonstrates the implementation of a code to automatically maximize an image. MATLAB Program Example % MATLAB program for automatically maximize an image % Read the input image img = imread('https://www.tutorialspoint.com/assets/questions/media/ 14304-1687425236.jpg'); % Replace 'your_image.jpg' with the path to your image % Display the original image in ... Read More

Auto Cropping Based on Labeling the Connected Components using MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:12:07

47 Views

In digital image processing, the auto cropping based labeling the connected components is a cropping technique in which different regions in an image are determined by using labeled connected component. After that the image is automatically cropped by extracting the surrounding area of each connecting component. The main advantage of the auto-cropping based on labeling the connected components is that it allows to isolate and extract individual regions of interest within an image. Algorithm The step-by-step process to execute the auto-cropping based on labeling the connected components is given below: Step 1 - Process the image if necessary. ... Read More

Adaptive Histogram Equalization in Image Processing Using MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:10:36

163 Views

Histogram equalization is a method used in image processing to improve the dynamic range of the histogram. This mathematical technique is widely used for enhancing the contrast of an image in digital image processing. This technique provides a wider and balanced distribution of pixel values in the image. Histogram equalization technique basically works by enhancing the range of brightness values in the image which makes it more visually attractive. Introduction to Adaptive Histogram Equalization (AHE) In digital image processing, the adaptive histogram equalization (AHE) is a method used for enhancing the contrast of an image. The adaptive histogram equalization ... Read More

Advertisements