www.pudn.com > roadextr.rar > strline.h


#include	"valdef.h" 
 
//int	DetectStrLineSeg_Gray(unsigned char *pucImg,int	nRow,int nCol,float	fA, 
//					float	fK1,float	fK2, 
//					StraightLineSeg	*pLineSeg,int	nST,int	nLengthMin,float	fErrorLimit); 
 
//void	MedianFilter(unsigned char *pucImg,int	nRow,int nCol,int	nN); 
 
//BOOL	EdgeDetByVision(unsigned char *pucImg,int	nRow,int nCol, 
//						float	fA, 
//						float	fK1,float	fK2); 
 
 
int	TraceSingleWidthCurve(unsigned char *pucImg,int	nRow,int nCol,LineSeg	*pCurve); 
 
int		TraceStrLineSeg(unsigned char *pucImg,int	nRow,int nCol, 
						StraightLineSeg	*pLineSeg,int	nST,int	nLengthMin,float	fErrorLimit); 
 
int		CompressALine02(double *pdfX,double *pdfY, 
			int  nPtCount,double  dfThresh,int	nStNo,int nEndNo, 
			char	*pcNo); 
 
int	CmprsLine02(double *pdfX,double *pdfY, 
			int  nPtCount,double  dfThresh); 
 
double	DisOfPtToLine02(double	dfX,double	dfY, 
					  double	dfPt1X,double	dfPt1Y, 
					  double	dfPt2X,double	dfPt2Y); 
 
int		FindMaxDisPtToLine02(double	*pdfX,double	*pdfY, 
						   int		nCount, 
						   double	dfPt1X,double	dfPt1Y, 
					  double	dfPt2X,double	dfPt2Y,double	*pdfMaxD); 
 
void	DeleteShortBanch(unsigned char *pucImg,int	nRow,int nCol,int	nST); 
 
 
//int	DetectStrLineSegFromPoly(unsigned char *pucImg,int	nRow,int nCol,float	fA, 
//					float	fK1,float	fK2,nPOINT	*pnptPolyPt,int	nPolyPtCount, 
//					StraightLineSeg	*pLineSeg,int	nST,int	nLengthMin, 
//					float	fErrorLimit); 
// 
// 
//void	SimpleThin2(unsigned char *pucImg,int	nRow,int nCol); 
 
//void	ComputeCross2(BYTE	*pucImg,int	*n,int	r,int	c,int	*k,int	*x,int	nImgCol); 
 
//BOOL	HilditchThin2(BYTE	*pucImg,int	nImgRow,int	nImgCol); 
 
///假定是凸多边形,扫描线填充算法 
//BOOL	PolyFill(unsigned char *pucImg,int	nRow,int	nCol, 
//				 nPOINT	*pnptPolyPt,int	nPolyPtCount); 
// 
//void	GetImgBlock2(BYTE	*pucWholeImg,int	nWCol, 
//					BYTE	*pucBlkImg,int	nBlkRow,int		nBlkCol, 
//					int		nSRow,int	nSCol); 
// 
//BOOL	FitStrLine(double *pdfX,double *pdfY, 
//			int  nPtCount,double	*pdfThta, 
//			double	*pdfStX,double	*pdfStY, 
//			double	*pdfEndX,double	*pdfEndY); 
// 
//void GetLineParaKB(double A,double B,double C, double& k1,double& b1); 
// 
////double min(double v1,double v2); 
//void GetStrLinePara(double *pdfX, double *pdfY,int	nPtCount, 
//		 double *K, double *B); 
 
//BOOL	GetGradientofStrLineSeg(unsigned char *pucImg,int	nRow,int nCol, 
//								StraightLineSeg	*pLineSeg, 
//								int	nSegCount); 
// 
//int		SemiAutoDetectCornerPt(unsigned char *pucImg,int	nRow,int nCol, 
//					 dfPOINT	dfptInput,double	dfDetRange, 
//					 CornerPt	*pCornerPt); 
// 
//BOOL	CrossPtOf2StraightLine(fPoint* pt, fPoint* interPt); 
// 
//BOOL	RectifyStraightEdgeSeg(unsigned char	*pucImg, 
//							   int	nRow,int	nCol,double	dfMaxBias, 
//							   dfPOINT	*pdfptIn,dfPOINT	*pdfptOut, 
//							   double	dfDltLimt); 
// 
// 
//BOOL	RetCordFromNewtoOld(double	dfX0,double	dfY0, 
//							double	dfThta,double	dfXin, 
//							double	dfYin,double	*pdfXout, 
//							double	*pdfYout); 
// 
//BOOL	RectifyAllEdgeLineSeg(unsigned char *pucImg,int	nRow,int nCol, 
//								StraightLineSeg	*pLineSeg, 
//								int	nSegCount,double	dfMaxBias); 
// 
//int		AutoDetectCornerPt( CornerPt	*pCornerPt,////// 角点 
//							StraightLineSeg	*pLineSeg,////// 边---直线段 
//							int	nLineSegC, 
//							int	*pnNoLineSeg,////点对应的边号 指针 
//							int	*pnNoCorners ////边对应的点号 指针 
//							); 
 
 
double	DisPtToLine(double	dfX,double	dfY, 
					  double	dfPt1X,double	dfPt1Y, 
					  double	dfPt2X,double	dfPt2Y); 
 
//int	AutoLineSegGrouping(StraightLineSeg	*pLineSeg, 
//								int	nSegCount,int	nTimes, 
//								double	dfThtaDlta, 
//								double	dfDisDlta); 
 
//BOOL	RectifyStraightEdgeSeg2(unsigned char	*pucImg, 
//							   int	nRow,int	nCol,double	dfLengthLimt, 
//							   dfPOINT	*pdfptIn, ///// 输入两点的坐标 
//							   dfPOINT	*pdfptOut, //// 输出两点的坐标 
//							   double	dfDltLimt); 
// 
// 
//double	Coorelation(unsigned char *pucImgBlkData, 
//					unsigned char *pucTemp1D, 
//					unsigned long	dwDataSize); 
// 
//BOOL	ReturnH0H1(unsigned char *pucImgBlkData, 
//					unsigned char *pucTemp1D, 
//					unsigned long	dwDataSize, 
//					double	*pdfH0,double	*pdfH1); 
 
//BOOL	ReGenerateTemp(unsigned char *pucNewTemp, 
//					   unsigned char *pucTemp1D, 
//					   unsigned long	dwDataSize, 
//					   double	dfH0,double	dfH1); 
// 
// 
//void	CordTrans2DNewtoOld(double	dfX0,double	dfY0, 
//							double	dfCosT,double dfSinT,double	dfXin, 
//							double	dfYin,double	*pdfXout, 
//							double	*pdfYout); 
// 
//long CompresImgbyAvergeNNPix(DWORD dwImgRow,DWORD   dwImgCol,WORD wK, 
//			 BYTE *pucImgData,BYTE *pucCmprs); 
 
//BOOL	EdgeDetBySobelMax(unsigned char *pucImg,int	nRow,int nCol, 
//						float	fA, 
//						float	fK1,float	fK2); 
// 
//BOOL	RepostionEdgePt(unsigned char	*pucImg, 
//					   int	nRow,int	nCol,double	dfLengthLimt, 
//					   dfPOINT	*pdfptIn,  
//					   dfPOINT	*pdfptOut, 
//					   double	dfDltLimt); 
// 
//int	SnaptoEdge(unsigned char	*pucImg, 
//				int	nRow,int	nCol, 
//				dfPOINT	*pdfptIn, ///// 输入两点的坐标 
//				dfPOINT	*pdfptOut); 
 
//BOOL	CrossPtOf2StraightLine_2(dfPOINT* pt, dfPOINT	* interPt); 
// 
//BOOL	RidgeDetBy1OrderZeroCrossing(unsigned char *pucImg,int	nRow,int nCol,float	fA, 
//						float	fK1,float	fK2); 
// 
//bool	ReturnMeanSigma(unsigned char	*pucI,int	nDataSize, 
//					  float	*pfMean,float	*pfSigma); 
// 
//bool	DetMeanBeltFeature(unsigned char	*pucI,int	nRow,int nCol, 
//					  int	nDetBeltWid,int	nTemplateWid,float	nSigmaTh); 
// 
//void	PutImgBlock2(BYTE	*pucWholeImg,int	nWCol, 
//					BYTE	*pucBlkImg,int	nBlkRow,int		nBlkCol, 
//					int		nSRow,int	nSCol); 
 
 
//void	DelCornerPtBinLineImg(unsigned char *pucImg,int	nRow,int nCol); 
 
void	SetStrSegGeoAttr(StraightLineSeg	*strLine); 
 
//float	RetMoravecIntValue(int	nX,int	nY,int	nW, 
//						   BYTE	*pucImg,int	nRow,int	nCol); 
// 
//double	RetSigmaof2ImgBlk(unsigned char *pucImgBlkData, 
//					unsigned char *pucTemp1D, 
//					unsigned long	dwDataSize); 
 
 
//int	Semiauto_Corner_Fast_Hough(unsigned char *pucImg,int	nRow,int nCol, 
//					 dfPOINT	dfptInput,int	dfDetRange, 
//					 CornerPt	*pCornerPt,int	nW); 
// 
//BOOL	SelfadpSmoothing2(unsigned char *pucImg,int	nRow,int nCol,int	nTimes,int nK ); 
// 
//int	TraceSingleWidthCurve_Long(unsigned char *pucImg,int	nRow,int nCol,LineSeg	*pCurve,float	fLmt); 
// 
//void	ReversTemp(BYTE *pucTemp,int	nTempH,int	nTempW); 
// 
//BOOL	A_LSTM_EdgeLineRectify(unsigned char	*pucImg,int	nRow,int	nCol,double	dfLengthLimt, 
//							   dfPOINT	*pdfptIn,dfPOINT	*pdfptOut,double	dfDltLimt);