libeblearntools
|
00001 /*************************************************************************** 00002 * Copyright (C) 2009 by Pierre Sermanet * 00003 * pierre.sermanet@gmail.com * 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions are met: 00008 * * Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * * Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * * Redistribution under a license not approved by the Open Source 00014 * Initiative (http://www.opensource.org) must display the 00015 * following acknowledgement in all advertising material: 00016 * This product includes software developed at the Courant 00017 * Institute of Mathematical Sciences (http://cims.nyu.edu). 00018 * * The names of the authors may not be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 00022 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00023 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00024 * DISCLAIMED. IN NO EVENT SHALL ThE AUTHORS BE LIABLE FOR ANY 00025 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00027 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00028 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00029 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 ***************************************************************************/ 00032 00033 #ifndef PASCALCLEAR_DATASET_H_ 00034 #define PASCALCLEAR_DATASET_H_ 00035 00036 #include "dataset.h" 00037 #include "xml_utils.h" 00038 00039 namespace ebl { 00040 00043 template <class Tdata> class pascalclear_dataset 00044 : public pascalbg_dataset<Tdata> { 00045 public: 00046 00048 // constructors 00049 00054 pascalclear_dataset(const char *name, const char *inroot, 00055 const char *outdir, const char *annotations); 00056 00058 virtual ~pascalclear_dataset(); 00059 00061 // data 00062 00064 virtual bool extract(); 00065 00066 protected: 00067 00068 #ifdef __BOOST__ // disable some derived methods if BOOST not available 00069 #ifdef __XML__ // disable some derived methods if XML not available 00070 00072 // internal methods 00073 00075 virtual void process_image(idx<ubyte> &img, vector<rect<int> >& bboxes, 00076 const string &image_filename); 00077 00078 #endif /* __BOOST__ */ 00079 #endif /* __XML__ */ 00080 00081 protected: 00082 // base class members to be used /////////////////////////////// 00083 using pascal_dataset<Tdata>::annroot; 00084 using pascal_dataset<Tdata>::imgroot; 00085 using dataset<Tdata>::inroot; 00086 using dataset<Tdata>::display_extraction; 00087 using dataset<Tdata>::display_result; 00088 using dataset<Tdata>::outdims; 00089 using dataset<Tdata>::outdir; 00090 using dataset<Tdata>::sleep_display; 00091 using dataset<Tdata>::sleep_delay; 00092 using dataset<Tdata>::data_cnt; 00093 using dataset<Tdata>::extension; 00094 }; 00095 00096 } // end namespace ebl 00097 00098 #include "pascalclear_dataset.hpp" 00099 00100 #endif /* PASCALCLEAR_DATASET_H_ */