Image intensity statistics
This function returns statistics on the intensity of an image, including the sum, mean, standard deviation, min and max. A rectangular region of interest can be selected by the user by using 'r' as the 2nd parameter. Alternatively, the region of interest can be more accurately defined by a passing its coordinates as a vector.
%IMGSTAT Image statistics
% Returns statistics of an image M, or a portion of it.
%
% Syntax
% [sum,avg,std,min,max] = imgstat(M)
% [sum,avg,std,min,max] = imgstat(M,'r')
% [sum,avg,std,min,max] = imgstat(M,V)
%
% Description
% imgstat(M)
% returns the stats of the matrix M.
%
% imgstat(M,'r')
% displays M and lets you select a rectangle for the stats. To
% constrain the rectangle to be a square, use a shift- or right-click
% to begin the drag.
%
% imgstat(M,V)
% returns the stats of a portion of M, defined by V.
% V is a four-element vector with the form [xmin ymin width height],
% with the origin being the upper-left corner of the image.
Cite As
Cyril (2024). Image intensity statistics (https://www.mathworks.com/matlabcentral/fileexchange/27870-image-intensity-statistics), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > ROI-Based Processing >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |