diff options
author | shamikam | 2017-01-16 02:56:17 +0530 |
---|---|---|
committer | shamikam | 2017-01-16 02:56:17 +0530 |
commit | a6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch) | |
tree | e806e966b06a53388fb300d89534354b222c2cad /macros/readForegroundMask.sci | |
download | FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.gz FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.bz2 FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.zip |
Diffstat (limited to 'macros/readForegroundMask.sci')
-rw-r--r-- | macros/readForegroundMask.sci | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/macros/readForegroundMask.sci b/macros/readForegroundMask.sci new file mode 100644 index 0000000..12db37e --- /dev/null +++ b/macros/readForegroundMask.sci @@ -0,0 +1,37 @@ +function varargout=readForegroundMask(varargin) +// This function computes the foreground mask for the input image. +// +// Calling Sequence +// mask = readForegroundMask(image) +// +// Parameters +// mask: the computed foreground mask. +// image : the input image +// +// +// Description +// This function returns the foreground mask for an image using Gaussian Mixed Models. +// +// Examples +// myStr = ForegroundDetector() +// myVideo = VideoReader('sample.mp4'); +// while hasFrame() +// frame = readFrame(); +// mask = readForegroundMask(frame); +// end +// +// +// Authors +// Shashank Shekhar +[lhs,rhs]=argn(0) + if rhs<1 then + error(msprintf(" Not enough input arguments")) + end + if rhs>1 then + error(msprintf(" Too many input arguments to the function")) + end + if lhs>1 then + error(msprintf(" Too many output arguments")) + end + varargout(1) = ocv_readForegroundMask(varargin(1)); +endfunction |