$search
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 // Intel License Agreement 00011 // For Open Source Computer Vision Library 00012 // 00013 // Copyright (C) 2000, Intel Corporation, all rights reserved. 00014 // Third party copyrights are property of their respective owners. 00015 // 00016 // Redistribution and use in source and binary forms, with or without modification, 00017 // are permitted provided that the following conditions are met: 00018 // 00019 // * Redistribution's of source code must retain the above copyright notice, 00020 // this list of conditions and the following disclaimer. 00021 // 00022 // * Redistribution's in binary form must reproduce the above copyright notice, 00023 // this list of conditions and the following disclaimer in the documentation 00024 // and/or other materials provided with the distribution. 00025 // 00026 // * The name of Intel Corporation may not be used to endorse or promote products 00027 // derived from this software without specific prior written permission. 00028 // 00029 // This software is provided by the copyright holders and contributors "as is" and 00030 // any express or implied warranties, including, but not limited to, the implied 00031 // warranties of merchantability and fitness for a particular purpose are disclaimed. 00032 // In no event shall the Intel Corporation or contributors be liable for any direct, 00033 // indirect, incidental, special, exemplary, or consequential damages 00034 // (including, but not limited to, procurement of substitute goods or services; 00035 // loss of use, data, or profits; or business interruption) however caused 00036 // and on any theory of liability, whether in contract, strict liability, 00037 // or tort (including negligence or otherwise) arising in any way out of 00038 // the use of this software, even if advised of the possibility of such damage. 00039 // 00040 //M*/ 00041 00042 #ifndef _CV_GEOM_H_ 00043 #define _CV_GEOM_H_ 00044 00045 /* Finds distance between two points */ 00046 CV_INLINE float icvDistanceL2_32f( CvPoint2D32f pt1, CvPoint2D32f pt2 ) 00047 { 00048 float dx = pt2.x - pt1.x; 00049 float dy = pt2.y - pt1.y; 00050 00051 return std::sqrt( dx*dx + dy*dy ); 00052 } 00053 00054 00055 int icvIntersectLines( double x1, double dx1, double y1, double dy1, 00056 double x2, double dx2, double y2, double dy2, 00057 double* t2 ); 00058 00059 00060 void icvCreateCenterNormalLine( CvSubdiv2DEdge edge, double* a, double* b, double* c ); 00061 00062 void icvIntersectLines3( double* a0, double* b0, double* c0, 00063 double* a1, double* b1, double* c1, 00064 CvPoint2D32f* point ); 00065 00066 00067 /* curvature: 0 - 1-curvature, 1 - k-cosine curvature. */ 00068 CvSeq* icvApproximateChainTC89( CvChain* chain, int header_size, CvMemStorage* storage, int method ); 00069 00070 #endif /*_IPCVGEOM_H_*/ 00071 00072 /* End of file. */