source: level2/competencies/MotionDirectionDetection/src/BackgroundSubtr.h @ 322

Revision 322, 1.7 KB checked in by ginevra, 10 years ago (diff)
Line 
1// AUTHOR: Ginevra Castellano
2// Queen Mary University of London
3// DATE: 03/2010
4// VERSION: 1.0
5
6// Copyright (C) 2009 Ginevra Castellano
7// Queen Mary University of London
8
9// This file is part of the MotionDirectionDetection program
10
11// MotionDirectionDetection is free software: you can redistribute it and/or modify
12// it under the terms of the GNU Lesser General Public License as published by
13// the Free Software Foundation, either version 3 of the License, or
14// (at your option) any later version.
15
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19// GNU Lesser General Public License for more details.
20
21// You should have received a copy of the GNU Lesser General Public License
22// along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
24// MotionDirectionDetection uses the OpenCV library
25// Copyright (C) 2000-2006, Intel Corporation, all rights reserved.
26// Third party copyrights are property of their respective owners.
27// See OpenCV_license.txt, in the program folder, for details.
28
29
30#ifndef _BACKGROUND_SUBTR
31#define _BACKGROUND_SUBTR
32
33#include "cv.h"
34#include "highgui.h"
35
36
37class BackgroundSubtr
38{
39        public:
40        BackgroundSubtr(void);
41        ~BackgroundSubtr(void);
42
43        // subtract background image from current frame
44        IplImage* extractBackground(IplImage *src, IplImage *backgrImg);
45
46        private:
47       
48        CvMemStorage* storage; // memory for calculations
49
50        IplImage *backgrImgGray;
51        IplImage *srcGray;
52        IplImage *frameForeground;
53        IplImage *ForegroundEroded;
54
55};
56#endif
Note: See TracBrowser for help on using the repository browser.