Programming Articles

Page 1790 of 2547

Thresholding-Based Image Segmentation in MATLAB

Manish Kumar Saini
Manish Kumar Saini
Updated on 08-Aug-2023 3K+ Views

In computer−based image analysis and processing, the image segmentation is an essential task. The image segmentation allows us to extract specific objects or regions from an image. In digital image processing, the most widely used image segmentation technique is the thresholding−based image segmentation. This image segmentation technique works depending on the pixel intensity values to separate different regions within an image. In this article, we will discuss learn the implementation of thresholding−based image segmentation using MATLAB programming. But before that let’s get into the basics of thresholding and its types. What is Thresholding? In digital image processing, the thresholding is ...

Read More

How to Convert RGB Image to YIQ Image using MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 08-Aug-2023 419 Views

In the field of digital image and video processing, there are two popular color spaces namely RGB and YIQ. Where, RGB stands for Red, Green, and Blue. The RGB color space is widely used for displaying digital images on display screens. This color space utilizes a combination of intensities of red, green, and blue lights. Therefore, in the RGB color space, each pixel in a digital image composed of three−color channels namely red, green, and blue. On the other hand, YIQ is another color space that is mainly employed in analog video or NTSC systems. YIQ stands for Luminance (Y), ...

Read More

How to Create a Dropdown Menu in MATLAB

Manish Kumar Saini
Manish Kumar Saini
Updated on 08-Aug-2023 507 Views

In this article, we will learn how to create a dropdown menu/list in MATLAB. In MATLAB, a dropdown menu is a user interface (UI) component allows users to choose one the multiple options or to type as text. In MATLAB, we have a built−in function named ‘unidropdown’ that allows to create a dropdown menu. This function can have different syntaxes to create different types of dropdown menu. The most commonly used types of dropdown menu are as follows: Dropdown menu without any parameters Dropdown menu with a specific parent container Dropdown menu with a specific parent container and properties ...

Read More

How to Count the Number of Circles in Given Digital Image Using MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 08-Aug-2023 455 Views

In this article, we will learn to implement MATLAB codes to count the number of circles in a digital image. The counting the number of circles in an image is performed by using various image processing techniques like image erosion, circle detection, etc. The step−by−step procedure to count the number of circles in a digital image in MATLAB is explained below: Step (1)− Read the input image. Step (2)− Convert the input image to grayscale, if necessary. Step (3)− Create a circular or disk−shaped structuring element of a specific size for erosion of the image. Step (4)− Erode the grayscale ...

Read More

How to Create a GUI Button in MATLAB App?

Manish Kumar Saini
Manish Kumar Saini
Updated on 08-Aug-2023 472 Views

In MATLAB App environment, we can develop a GUI (Graphical User Interface) app without having proper knowledge of coding. Therefore, MATLAB app building allows us to create professional applications without writing code, and just by drag−drop. In this article, we will discuss how to create a GUI button in a MATLAB application. The step−by−step procedure to create a GUI button in a MATLAB app is explained below. Steps to Create GUI Button in MATLAB App We can follow the following steps to create a GUI button in a MATLAB application: Step(1)– Open the MATLAB command window. Step(2)– Launch the MATLAB ...

Read More

Compute the mean, standard deviation, and variance of a given NumPy array

Niharika Aitam
Niharika Aitam
Updated on 07-Aug-2023 731 Views

Mean, Standard Deviation and Variance are the statistical measures which are used to describe the distribution of the given dataset data. In Numpy library, we have the functions to calculate the mean, standard deviation and variance of the arrays. Let’s see one by one in detail. Mean Mean is also known as average, which is the sum of all the elements in the array divided by the total number of elements. It is used to represent the central tendency of the data. Syntax Following is the syntax for applying the mean function on the arrays - numpy.mean(arr) ...

Read More

Compute the inverse of a matrix using inv() function of NumPy

Niharika Aitam
Niharika Aitam
Updated on 07-Aug-2023 262 Views

The inverse matrix is a matrix that gives a multiplicative identity when multiplied with its original matrix. It is denoted by A-1. The inverse matrix can be calculated for the square matrices with the n x n size. The mathematical formula given for calculating the inverse matrix is as follows. A-1 . A = A . A-1 = I Where, A is the original matrix. A-1 is the inverse of the original matrix A. I is the identity matrix. Let’s take the original matrix as A with the size 2 x 2 and elements as ...

Read More

Compute the covariance matrix of two given NumPy arrays

Niharika Aitam
Niharika Aitam
Updated on 07-Aug-2023 1K+ Views

Covariance is the measure of two variables that defines how they are related to each other. In other words, it measures the extent to which one variable is associated with the changes in the other variable. When the covariance of the variables is positive, it implies that both variables are moving in the same direction i.e. if one variable tends to increase, as a result, the value of the other variable also increases. When the covariance of the variables is negative then it represents the two variables are moving in opposite direction i.e. if one variable increases the value ...

Read More

How to Change the Background of an Image with Green Screen Background in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 07-Aug-2023 498 Views

In this article, we learn how to change the green background of an image to some other background using MATLAB programming. The concept of changing a green screen background to another background involves the use of a technology called “chroma key”. This technology detects the absolute green color in the image and omits it from the image. Then, we can apply another image or color as the background to the image. Algorithm The step−by−step process of changing the green screen background of an image with another background in MATLAB is explained below: Step (1) − Read the input image with ...

Read More

How to Calculate Variance in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 07-Aug-2023 662 Views

In this article, we will explore how to calculate variance in MATLAB. In mathematics, variance is a statistical tool used to measure the degree of dispersion of a set of data points around its average value. It is widely used to quantify the diversity or variability of a set of data points. We can compute variance of a data set by using the following formula: $\mathrm{Var=\frac{\displaystyle\sum\limits_{i=1}^n (x_i −\bar{x})^2}{n}}$ Where, xi is the individual data points, is the average of data set, and n is the total number of data points in the set. The following sections of this articles ...

Read More
Showing 17891–17900 of 25,466 articles
Advertisements