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

colorsearchparams.h

Go to the documentation of this file.
00001 /*
00002  *  colorsearchparams.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 __COLORSEARCHPARAMS_H__
00014 #define __COLORSEARCHPARAMS_H__
00015 
00016 struct ColorSearchParams {
00017 #ifdef PREDICTIVE
00018         enum {MAXPRIOREFFECT = 0, MINPRIOREFFECT = 999999999};
00019 #else
00020         enum {MAXPRIOREFFECT = 999999999, MINPRIOREFFECT = 0};
00021 #endif
00022         int decimation_factor;
00023         float smooth_result;
00024 #ifdef PREDICTIVE
00025         int m_min_scale_up;
00026         int m_min_stride;
00027         float m_min_scale_pct; 
00028         float m_stride_pct; 
00029         float m_scale_up_pct;
00030         float m_location_window;
00031         float m_scale_window;
00032 #else
00033         TSquare<double> vbox;
00034 #endif
00035         
00036         void Initialize() {
00037                 decimation_factor = 2;
00038                 smooth_result = .5;
00039 #ifdef PREDICTIVE
00040                 m_min_scale_up = 1;
00041                 m_min_stride = 1;
00042                 m_min_scale_pct = 0.1f; 
00043                 m_stride_pct = 0; 
00044                 m_scale_up_pct = 0;
00045                 m_location_window = m_scale_window = static_cast<float>(MINPRIOREFFECT);
00046 #else
00047                 vbox.x = MINPRIOREFFECT;
00048                 vbox.y = MINPRIOREFFECT;
00049                 vbox.size = MINPRIOREFFECT;
00050 #endif
00051         }
00052         
00053         ColorSearchParams() {
00054                 Initialize();
00055         }
00056         
00057 };
00058 
00059 #endif  //__COLORSEARCHPARAMS_H__
00060 
00061 /*
00062  * 
00063  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00064  * 
00065  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00066  *    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.
00067  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00068  * 
00069  * 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.
00070  * 
00071  */

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