0% found this document useful (0 votes)
61 views2 pages

Numel: (-5,5) Y1 Linspace (-5,5,7) Y1 - 5.0000 - 3.3333 - 1.6667 0 1.6667 3.3333 5.0000

The document discusses functions for creating vectors, determining the number of elements in an array, converting matrices to grayscale images, and performing linear and non-linear normalization of grayscale images. mat2gray converts a matrix to an intensity image by mapping values in the matrix to a range from 0 to 1. Linear normalization rescales pixel intensities in an image to span a desired range, like converting a range of 50 to 180 to 0 to 255. Non-linear normalization may use a sigmoid function rather than a linear relationship.

Uploaded by

Rafflesia Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

Numel: (-5,5) Y1 Linspace (-5,5,7) Y1 - 5.0000 - 3.3333 - 1.6667 0 1.6667 3.3333 5.0000

The document discusses functions for creating vectors, determining the number of elements in an array, converting matrices to grayscale images, and performing linear and non-linear normalization of grayscale images. mat2gray converts a matrix to an intensity image by mapping values in the matrix to a range from 0 to 1. Linear normalization rescales pixel intensities in an image to span a desired range, like converting a range of 50 to 180 to 0 to 255. Non-linear normalization may use a sigmoid function rather than a linear relationship.

Uploaded by

Rafflesia Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

 Create a vector of 7 evenly spaced points in the interval [-5,5].

y1 = linspace(-5,5,7)

y1 =

-5.0000 -3.3333 -1.6667 0 1.6667 3.3333 5.0000

 n = numel(A) returns the number of elements, n, in array A, equivalent to prod(size(A)).

 I = mat2gray(A, [amin amax]) converts the matrix A to the intensity image I. The returned matrix
I contains values in the range 0.0 (black) to 1.0 (full intensity or white). amin and amax are the
values in A that correspond to 0.0 and 1.0 in I. Values less than amin become 0.0, and values
greater than amax become 1.0.

 I = mat2gray(A) sets the values of amin and amax to the minimum and maximum values in A.

 gpuarrayI = mat2gray(gpuarrayA,___) performs the operation on a GPU. This syntax requires the
Parallel Computing Toolbox™.

The linear normalization of a grayscale digital image is performed according to the formula

For example, if the intensity range of the image is 50 to 180 and the desired range is 0 to 255
the process entails subtracting 50 from each of pixel intensity, making the range 0 to 130. Then
each pixel intensity is multiplied by 255/130, making the range 0 to 255.
Normalization might also be non linear, this happens when there isn't a linear relationship

between and . An example of non-linear normalization is when the normalization


follows a sigmoid function, in that case, the normalized image is computed according to the
formula

Where defines the width of the input intensity range, and defines the intensity
around which the range is centered.[2]
Auto-normalization in image processing software typically normalizes to the full dynamic
range of the number system specified in the image file format.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy