The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MPKeyFrame.h

Go to the documentation of this file.
00001 /*
00002  *  MPKeyFrame.h
00003  *  
00004  *
00005  *  Created by Josh Susskind 2003.
00006  *  Copyright (c) 2003 Machine Perception Laboratory
00007  *  University of California San Diego.
00008  *  Please read the disclaimer and notes about redistribution
00009  *  at the end of this file.
00010  *
00011  *  Authors: Josh Susskind
00012  */
00013 #ifndef __MPKEYFRAME_H__
00014 #define __MPKEYFRAME_H__
00015 
00016 /* ================================================================ */
00017 
00018 struct MPKeyFrame {
00019         long framenum;
00020         int x;
00021         int y;
00022         int w;
00023         int h;
00024 
00025         MPKeyFrame() {
00026                 framenum = 0;
00027                 x = y = w = h = 0;
00028         }
00029 
00030         MPKeyFrame(const long &_framenum, const int &_x, const int &_y, const int &_w, const int &_h) {
00031                 framenum = _framenum;
00032                 x = _x;
00033                 y = _y;
00034                 w = _w;
00035                 h = _h;
00036         }
00037 };
00038 
00039 /* ================================================================ */
00040 
00041 struct MPKeyFrameCollection {
00042         void add_to_collection(MPKeyFrame &frame);
00043 //      void add_to_collection(const long &framenum, const int &x, const int &y, const int &w, const int &h);
00044         void get_keyframe(MPKeyFrame &frame, int &n);
00045         void get_keyframe(long &framenum, int &x, int &y, int &w, int &h, int &n);
00046         bool empty();
00047         int size();
00048         void read_frames_from_file(char *filename);
00049         void write_frames_to_file(char *filename);
00050 };
00051 
00052 /* ================================================================ */
00053 
00054 #endif  //__MPKEYFRAME_H__
00055 
00056 
00057 /*
00058  * 
00059  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00060  * 
00061  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00062  *    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
00063  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00064  * 
00065  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00066  * 
00067  */

Generated on Mon Nov 8 17:07:46 2004 for MPT by  doxygen 1.3.9.1