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

blink.h

Go to the documentation of this file.
00001 /*
00002  *  blink.
00003  *
00004  *  Author:Ian Fasel, Bret Fortenberry
00005  *  Fixes:
00006  *
00007  *  Copyright (c) 2003 Machine Perception Laboratory
00008  *  University of California San Diego.
00009  *
00010  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00011  *
00012  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00013  *    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.
00014  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00015  *
00016  * 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.
00017  *
00018  */
00019 
00020 #ifndef __BLINK_H__
00021 #define __BLINK_H__
00022 
00023 #include "eyefinderBinary.h"
00024 #include "cluster.h"
00025 
00026 struct BlinkValue{
00027         int blinkMax;
00028         int openMax;
00029         int blinkTotal;
00030         int openTotal;
00031         float blinkMean;
00032         float openMean;
00033 };
00034 
00035 struct SHIFTARRAY{
00036         int x;
00037         int y;
00038 }; 
00039 
00040 class MPBlink : public MPISearchFaceDetector {
00041  public:
00042   BlinkValue bVal;
00043   double activation;
00044   //SHIFTARRAY ShiftArray[9];
00045 
00046   MPBlink ( );
00047   ~MPBlink();
00048   
00049   double findBlinks(const RImage<float> &pixels, VisualObject &faces,
00050                float WINSHIFT=1.25, combine_mode mode=none);
00051 
00052  protected:
00053         MPEyeFinder *eyefinder;
00054         int previousWidth, previousHeight;
00055   int imgCount;
00056   RImage<float>* eyes;
00057   Cluster cluster;
00058 
00059   void DisplayDecay(double actp);
00060   double eucDistance(int x, int y);
00061   void get_eyes(const RImage<float> &pixels, Square &face);
00062   void get_eyes(const RImage<float> &pixels, VisualObject &faces);
00063 };
00064 
00065 #endif
00066 
00067 
00068 /*
00069  * 
00070  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00071  * 
00072  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00073  *    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.
00074  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00075  * 
00076  * 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.
00077  * 
00078  */

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