-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsss_histogram.m
42 lines (38 loc) · 1.08 KB
/
sss_histogram.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function hist_values = sss_histogram(img, varargin)
% This function draws the histogram of an SSS image
%
% Input-
% img: a 2D image
%
% Output-
% hist_values: A vector containing the histogram of the image
%
% Example:
% hist_values = sss_histogram(x.left); % x.left is a left SSS image
%
%
% Author: Mohammed Al-Rawi, [email protected]
%
% Project: SWARMs
% Date: Oct 22, 2016
%
%
%
% Project SWARMs http://www.swarms.eu/
%
% License:
%=====================================================================
% This is part of the UNDROIP toolbox, released under
% the GPL. https://github.com/rawi707/UNDROIP/blob/master/LICENSE
%
% The UNDROIP toolbox is available free and
% unsupported to those who might find it useful. We do not
% take any responsibility whatsoever for any problems that
% you have related to the use of the UNDROIP toolbox.
%
% ======================================================================
%%
defaults.number_of_bins = 1000;
args = propval(varargin, defaults);
h = histogram(img, args.number_of_bins);
hist_values = h.Values;