////////////////////////////////////////////////////////////////////////////// //文件 TraceContour.h //主要功能: // //程序编写: 2005-12-07 ///////////////////////////////////////////////////////////////////////////// #pragma once #include "ImageTraceBase.h" namespace NImage { //图像半自动矢量化 class AFX_EXT_CLASS CTraceContour : public CImageTraceBase { public: CTraceContour(void); virtual ~CTraceContour(void); public: int ExtremumTrace(POINT point); void SetWidthError(double dwe); double GetWidthError(void); void SetWidthScale(double dws); double GetWidthScale(void); protected: COLORREF m_curColor; double m_errWidthError; double m_errWidthScale; double cw; int MaxPD; int RepeatNum; double MinAngle(POINT &point); int GetRange(POINT point,double angle,POINT &begin,POINT &end); int TraceCurve(POINT point,double angle,int HeadOrTail); int GetNextPoint(POINT &point,int &r,int state=1); int IsInCurve(POINT& t); POINT Direction(POINT &point,int r); }; };