Joe Verbout
/
main
opencv on mbed
Embed:
(wiki syntax)
Show/hide line numbers
hist_cost.hpp
00001 /*M/////////////////////////////////////////////////////////////////////////////////////// 00002 // 00003 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 00004 // 00005 // By downloading, copying, installing or using the software you agree to this license. 00006 // If you do not agree to this license, do not download, install, 00007 // copy or use the software. 00008 // 00009 // 00010 // License Agreement 00011 // For Open Source Computer Vision Library 00012 // 00013 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 00014 // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 00015 // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 00016 // Third party copyrights are property of their respective owners. 00017 // 00018 // Redistribution and use in source and binary forms, with or without modification, 00019 // are permitted provided that the following conditions are met: 00020 // 00021 // * Redistribution's of source code must retain the above copyright notice, 00022 // this list of conditions and the following disclaimer. 00023 // 00024 // * Redistribution's in binary form must reproduce the above copyright notice, 00025 // this list of conditions and the following disclaimer in the documentation 00026 // and/or other materials provided with the distribution. 00027 // 00028 // * The name of the copyright holders may not be used to endorse or promote products 00029 // derived from this software without specific prior written permission. 00030 // 00031 // This software is provided by the copyright holders and contributors "as is" and 00032 // any express or implied warranties, including, but not limited to, the implied 00033 // warranties of merchantability and fitness for a particular purpose are disclaimed. 00034 // In no event shall the Intel Corporation or contributors be liable for any direct, 00035 // indirect, incidental, special, exemplary, or consequential damages 00036 // (including, but not limited to, procurement of substitute goods or services; 00037 // loss of use, data, or profits; or business interruption) however caused 00038 // and on any theory of liability, whether in contract, strict liability, 00039 // or tort (including negligence or otherwise) arising in any way out of 00040 // the use of this software, even if advised of the possibility of such damage. 00041 // 00042 //M*/ 00043 00044 #ifndef __OPENCV_HIST_COST_HPP__ 00045 #define __OPENCV_HIST_COST_HPP__ 00046 00047 #include "opencv2/imgproc.hpp" 00048 00049 namespace cv 00050 { 00051 00052 //! @addtogroup shape 00053 //! @{ 00054 00055 /** @brief Abstract base class for histogram cost algorithms. 00056 */ 00057 class CV_EXPORTS_W HistogramCostExtractor : public Algorithm 00058 { 00059 public: 00060 CV_WRAP virtual void buildCostMatrix(InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix) = 0; 00061 00062 CV_WRAP virtual void setNDummies(int nDummies) = 0; 00063 CV_WRAP virtual int getNDummies() const = 0; 00064 00065 CV_WRAP virtual void setDefaultCost(float defaultCost) = 0; 00066 CV_WRAP virtual float getDefaultCost() const = 0; 00067 }; 00068 00069 /** @brief A norm based cost extraction. : 00070 */ 00071 class CV_EXPORTS_W NormHistogramCostExtractor : public HistogramCostExtractor 00072 { 00073 public: 00074 CV_WRAP virtual void setNormFlag(int flag) = 0; 00075 CV_WRAP virtual int getNormFlag() const = 0; 00076 }; 00077 00078 CV_EXPORTS_W Ptr<HistogramCostExtractor> 00079 createNormHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f); 00080 00081 /** @brief An EMD based cost extraction. : 00082 */ 00083 class CV_EXPORTS_W EMDHistogramCostExtractor : public HistogramCostExtractor 00084 { 00085 public: 00086 CV_WRAP virtual void setNormFlag(int flag) = 0; 00087 CV_WRAP virtual int getNormFlag() const = 0; 00088 }; 00089 00090 CV_EXPORTS_W Ptr<HistogramCostExtractor> 00091 createEMDHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f); 00092 00093 /** @brief An Chi based cost extraction. : 00094 */ 00095 class CV_EXPORTS_W ChiHistogramCostExtractor : public HistogramCostExtractor 00096 {}; 00097 00098 CV_EXPORTS_W Ptr<HistogramCostExtractor> createChiHistogramCostExtractor(int nDummies=25, float defaultCost=0.2f); 00099 00100 /** @brief An EMD-L1 based cost extraction. : 00101 */ 00102 class CV_EXPORTS_W EMDL1HistogramCostExtractor : public HistogramCostExtractor 00103 {}; 00104 00105 CV_EXPORTS_W Ptr<HistogramCostExtractor> 00106 createEMDL1HistogramCostExtractor(int nDummies=25, float defaultCost=0.2f); 00107 00108 //! @} 00109 00110 } // cv 00111 #endif 00112
Generated on Tue Jul 12 2022 16:42:38 by 1.7.2