Lines Matching refs:pEdge1
686 float _cvCalcEdgeIntersection(pCvVoronoiEdge pEdge1,
708 float _cvLine_LineIntersection(pCvVoronoiEdge pEdge1,
730 float _cvLine_ParIntersection(pCvVoronoiEdge pEdge1,
752 float _cvLine_CloseParIntersection(pCvVoronoiEdge pEdge1,
774 float _cvLine_OpenParIntersection(pCvVoronoiEdge pEdge1,
796 float _cvPar_LineIntersection(pCvVoronoiEdge pEdge1,
817 float _cvPar_OpenLineIntersection(pCvVoronoiEdge pEdge1,
839 float _cvPar_CloseLineIntersection(pCvVoronoiEdge pEdge1,
861 float _cvPar_ParIntersection(pCvVoronoiEdge pEdge1,
884 float _cvPar_OpenParIntersection(pCvVoronoiEdge pEdge1,
906 float _cvPar_CloseParIntersection(pCvVoronoiEdge pEdge1,
925 pCvVoronoiEdge pEdge1);
2527 pCvVoronoiEdge pEdge1,pEdge2; in _cvConstructEdges() local
2544 pEdge1 = _cvSeqPush(EdgeSeq,&Edge); in _cvConstructEdges()
2552 pEdge1 = _cvSeqPush(EdgeSeq,&Edge); in _cvConstructEdges()
2559 pEdge1->direction = pSite_prev->edge2->direction; in _cvConstructEdges()
2560 pEdge1->twin_edge = pSite_prev->edge2; in _cvConstructEdges()
2561 pSite_prev->edge2->twin_edge = pEdge1; in _cvConstructEdges()
2565 pEdge1->node2 = pSite->node1; in _cvConstructEdges()
2566 pSite->edge1 = pEdge1; in _cvConstructEdges()
2568 pEdge2->next_edge = pEdge1; in _cvConstructEdges()
2569 pEdge1->prev_edge = pEdge2; in _cvConstructEdges()
2647 pCvVoronoiEdge pEdge1,pEdge2; in _cvJoinChains() local
2656 pEdge1 = pSite_left->edge2; in _cvJoinChains()
2657 pEdge1->node2 = NULL; in _cvJoinChains()
2665 pEdge1->node1 = pNode_begin; in _cvJoinChains()
2674 _cvCalcEdge(pSite_left,pSite_right,pEdge1,pVoronoiDiagram); in _cvJoinChains()
2675 _cvMakeTwinEdge(pEdge2,pEdge1); in _cvJoinChains()
2676 _cvStickEdgeLeftBegin(pEdge1,pEdge_left_prev,pSite_left); in _cvJoinChains()
2686 _cvCalcEdge(pSite_left,pNode_siteright,pEdge1,pVoronoiDiagram); in _cvJoinChains()
2687 _cvStickEdgeLeftBegin(pEdge1,pEdge_left_prev,pSite_left); in _cvJoinChains()
2703 dist1 = _cvCalcEdgeIntersection(pEdge1, pEdge_left, &Point1,radius1); in _cvJoinChains()
2723 dist2 = _cvCalcEdgeIntersection(pEdge1, pEdge_right, &Point2, radius2); in _cvJoinChains()
2739 _cvStickEdgeLeftEnd(pEdge1,NULL,pSite_left); in _cvJoinChains()
2749 _cvStickEdgeLeftEnd(pEdge1,pEdge_left,pSite_left); in _cvJoinChains()
2777 pEdge1->node2 = pNode_begin; in _cvJoinChains()
2780 _cvStickEdgeLeftEnd(pEdge1,pEdge_left,pSite_left); in _cvJoinChains()
2799 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvJoinChains()
2823 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvJoinChains()
2837 pEdge1->node2 = pNode_begin; in _cvJoinChains()
2839 _cvStickEdgeLeftEnd(pEdge1,pEdge_left,pSite_left); in _cvJoinChains()
2852 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvJoinChains()
2871 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvJoinChains()
2890 pEdge1->node2 = pNode_begin; in _cvJoinChains()
2891 pEdge_left_prev = pEdge1; in _cvJoinChains()
2892 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvJoinChains()
3208 pCvVoronoiEdge pEdge1,pEdge2,pEdge1_first, pEdge2_first; in _cvMergeVD() local
3215 pEdge1_first = pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL);; in _cvMergeVD()
3217 pEdge1->site = pSite_left_first; in _cvMergeVD()
3222 pEdge1->node1 = pEdge2->node2 = pNode_begin; in _cvMergeVD()
3227 _cvCalcEdge(pSite_left,pSite_right,pEdge1,pVoronoiDiagram); in _cvMergeVD()
3228 _cvMakeTwinEdge(pEdge2,pEdge1); in _cvMergeVD()
3231 _cvStickEdgeLeftBegin(pEdge1,pEdge_left_prev,pSite_left); in _cvMergeVD()
3244 dist1 = _cvCalcEdgeIntersection(pEdge1, pEdge_left, &Point1,radius1); in _cvMergeVD()
3253 dist2 = _cvCalcEdgeIntersection(pEdge1, pEdge_right, &Point2,radius2); in _cvMergeVD()
3260 dist2 = _cvCalcEdgeIntersection(pEdge1, pEdge_right, &Point2, radius2); in _cvMergeVD()
3271 pEdge1->node2 = pNode_begin; in _cvMergeVD()
3276 _cvStickEdgeLeftEnd(pEdge1,pEdge_left,pSite_left); in _cvMergeVD()
3284 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvMergeVD()
3300 pEdge1->node2 = pNode_begin; in _cvMergeVD()
3301 _cvStickEdgeLeftEnd(pEdge1,pEdge_left,pSite_left); in _cvMergeVD()
3312 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvMergeVD()
3327 pEdge1->node2 = pNode_begin; in _cvMergeVD()
3328 pEdge_left_prev = pEdge1; in _cvMergeVD()
3329 pEdge1 = _cvSeqPush(EdgeSeq, &EdgeNULL); in _cvMergeVD()
3501 float _cvCalcEdgeIntersection(pCvVoronoiEdge pEdge1, in _cvCalcEdgeIntersection() argument
3506 if((pEdge1->parabola==NULL)&&(pEdge2->parabola==NULL)) in _cvCalcEdgeIntersection()
3507 return _cvLine_LineIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvCalcEdgeIntersection()
3508 if((pEdge1->parabola==NULL)&&(pEdge2->parabola!=NULL)) in _cvCalcEdgeIntersection()
3509 return _cvLine_ParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvCalcEdgeIntersection()
3510 if((pEdge1->parabola!=NULL)&&(pEdge2->parabola==NULL)) in _cvCalcEdgeIntersection()
3511 return _cvPar_LineIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvCalcEdgeIntersection()
3512 if((pEdge1->parabola!=NULL)&&(pEdge2->parabola!=NULL)) in _cvCalcEdgeIntersection()
3513 return _cvPar_ParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvCalcEdgeIntersection()
3518 float _cvLine_LineIntersection(pCvVoronoiEdge pEdge1, in _cvLine_LineIntersection() argument
3523 if(((pEdge1->node1 == pEdge2->node1 || in _cvLine_LineIntersection()
3524 pEdge1->node1 == pEdge2->node2) && in _cvLine_LineIntersection()
3525 pEdge1->node1 != NULL)|| in _cvLine_LineIntersection()
3526 ((pEdge1->node2 == pEdge2->node1 || in _cvLine_LineIntersection()
3527 pEdge1->node2 == pEdge2->node2) && in _cvLine_LineIntersection()
3528 pEdge1->node2 != NULL)) in _cvLine_LineIntersection()
3536 if(pEdge1->node1!=NULL) in _cvLine_LineIntersection()
3538 Point1.x = pEdge1->node1->node.x; in _cvLine_LineIntersection()
3539 Point1.y = pEdge1->node1->node.y; in _cvLine_LineIntersection()
3543 Point1.x = pEdge1->node2->node.x; in _cvLine_LineIntersection()
3544 Point1.y = pEdge1->node2->node.y; in _cvLine_LineIntersection()
3546 x21 = pEdge1->direction->x; in _cvLine_LineIntersection()
3547 y21 = pEdge1->direction->y; in _cvLine_LineIntersection()
3584 if(((pEdge1->node2!=NULL)&&(pEdge1->node1!=NULL))&&(k>1.f+LEE_CONST_ACCEPTABLE_ERROR)) in _cvLine_LineIntersection()
3592 Radius = _cvCalcDist(pPoint,pEdge1->site); in _cvLine_LineIntersection()
3597 float _cvLine_ParIntersection(pCvVoronoiEdge pEdge1, in _cvLine_ParIntersection() argument
3603 return _cvLine_OpenParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvLine_ParIntersection()
3605 return _cvLine_CloseParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvLine_ParIntersection()
3609 float _cvLine_OpenParIntersection(pCvVoronoiEdge pEdge1, in _cvLine_OpenParIntersection() argument
3615 if(((pEdge1->node1 == pEdge2->node1 || in _cvLine_OpenParIntersection()
3616 pEdge1->node1 == pEdge2->node2) && in _cvLine_OpenParIntersection()
3617 pEdge1->node1 != NULL)|| in _cvLine_OpenParIntersection()
3618 ((pEdge1->node2 == pEdge2->node1 || in _cvLine_OpenParIntersection()
3619 pEdge1->node2 == pEdge2->node2) && in _cvLine_OpenParIntersection()
3620 pEdge1->node2 != NULL)) in _cvLine_OpenParIntersection()
3624 if(pEdge1->node1!=NULL) in _cvLine_OpenParIntersection()
3625 pRayPoint1 = &(pEdge1->node1->node); in _cvLine_OpenParIntersection()
3627 pRayPoint1 = &(pEdge1->node2->node); in _cvLine_OpenParIntersection()
3629 pCvDirection pDirection = pEdge1->direction; in _cvLine_OpenParIntersection()
3719 float _cvLine_CloseParIntersection(pCvVoronoiEdge pEdge1, in _cvLine_CloseParIntersection() argument
3725 if(((pEdge1->node1 == pEdge2->node1 || in _cvLine_CloseParIntersection()
3726 pEdge1->node1 == pEdge2->node2) && in _cvLine_CloseParIntersection()
3727 pEdge1->node1 != NULL)|| in _cvLine_CloseParIntersection()
3728 ((pEdge1->node2 == pEdge2->node1 || in _cvLine_CloseParIntersection()
3729 pEdge1->node2 == pEdge2->node2) && in _cvLine_CloseParIntersection()
3730 pEdge1->node2 != NULL)) in _cvLine_CloseParIntersection()
3734 if(pEdge1->node1!=NULL) in _cvLine_CloseParIntersection()
3735 pRayPoint1 = &(pEdge1->node1->node); in _cvLine_CloseParIntersection()
3737 pRayPoint1 = &(pEdge1->node2->node); in _cvLine_CloseParIntersection()
3739 pCvDirection pDirection = pEdge1->direction; in _cvLine_CloseParIntersection()
3849 float _cvPar_LineIntersection(pCvVoronoiEdge pEdge1, in _cvPar_LineIntersection() argument
3855 return _cvPar_OpenLineIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvPar_LineIntersection()
3857 return _cvPar_CloseLineIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvPar_LineIntersection()
3861 float _cvPar_OpenLineIntersection(pCvVoronoiEdge pEdge1, in _cvPar_OpenLineIntersection() argument
3867 if(((pEdge1->node1 == pEdge2->node1 || in _cvPar_OpenLineIntersection()
3868 pEdge1->node1 == pEdge2->node2) && in _cvPar_OpenLineIntersection()
3869 pEdge1->node1 != NULL)|| in _cvPar_OpenLineIntersection()
3870 ((pEdge1->node2 == pEdge2->node1 || in _cvPar_OpenLineIntersection()
3871 pEdge1->node2 == pEdge2->node2) && in _cvPar_OpenLineIntersection()
3872 pEdge1->node2 != NULL)) in _cvPar_OpenLineIntersection()
3875 float* Parabola = pEdge1->parabola->map; in _cvPar_OpenLineIntersection()
3877 if(pEdge1->node1!=NULL) in _cvPar_OpenLineIntersection()
3878 pParPoint1 = &(pEdge1->node1->node); in _cvPar_OpenLineIntersection()
3880 pParPoint1 = &(pEdge1->node2->node); in _cvPar_OpenLineIntersection()
3899 float q = RayPoint1_img.y - pEdge1->parabola->a*RayPoint1_img.x*RayPoint1_img.x; in _cvPar_OpenLineIntersection()
3904 float c2 = pEdge1->parabola->a*Direction_img.x; in _cvPar_OpenLineIntersection()
3925 (pEdge1->parabola->a*X[i]*X[i]-RayPoint1_img.y)*sign_y; in _cvPar_OpenLineIntersection()
3938 Point.y = pEdge1->parabola->a*Point.x*Point.x; in _cvPar_OpenLineIntersection()
3939 Radius = Point.y + 1.f/(4*pEdge1->parabola->a); in _cvPar_OpenLineIntersection()
3949 float _cvPar_CloseLineIntersection(pCvVoronoiEdge pEdge1, in _cvPar_CloseLineIntersection() argument
3955 if(((pEdge1->node1 == pEdge2->node1 || in _cvPar_CloseLineIntersection()
3956 pEdge1->node1 == pEdge2->node2) && in _cvPar_CloseLineIntersection()
3957 pEdge1->node1 != NULL)|| in _cvPar_CloseLineIntersection()
3958 ((pEdge1->node2 == pEdge2->node1 || in _cvPar_CloseLineIntersection()
3959 pEdge1->node2 == pEdge2->node2) && in _cvPar_CloseLineIntersection()
3960 pEdge1->node2 != NULL)) in _cvPar_CloseLineIntersection()
3963 float* Parabola = pEdge1->parabola->map; in _cvPar_CloseLineIntersection()
3965 if(pEdge1->node1!=NULL) in _cvPar_CloseLineIntersection()
3966 pParPoint1 = &(pEdge1->node1->node); in _cvPar_CloseLineIntersection()
3968 pParPoint1 = &(pEdge1->node2->node); in _cvPar_CloseLineIntersection()
3986 q = RayPoint1_img.y - pEdge1->parabola->a*RayPoint1_img.x*RayPoint1_img.x; in _cvPar_CloseLineIntersection()
3993 q = RayPoint2_img.y - pEdge1->parabola->a*RayPoint2_img.x*RayPoint2_img.x; in _cvPar_CloseLineIntersection()
4002 float c2 = pEdge1->parabola->a*Direction_img.x; in _cvPar_CloseLineIntersection()
4023 (pEdge1->parabola->a*X[i]*X[i]-RayPoint1_img.y)*sign_y; in _cvPar_CloseLineIntersection()
4036 Point.y = pEdge1->parabola->a*Point.x*Point.x; in _cvPar_CloseLineIntersection()
4037 Radius = Point.y + 1.f/(4*pEdge1->parabola->a); in _cvPar_CloseLineIntersection()
4047 float _cvPar_ParIntersection(pCvVoronoiEdge pEdge1, in _cvPar_ParIntersection() argument
4053 return _cvPar_OpenParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvPar_ParIntersection()
4055 return _cvPar_CloseParIntersection(pEdge1,pEdge2,pPoint,Radius); in _cvPar_ParIntersection()
4059 float _cvPar_OpenParIntersection(pCvVoronoiEdge pEdge1, in _cvPar_OpenParIntersection() argument
4065 if(((pEdge1->node1 == pEdge2->node1 || in _cvPar_OpenParIntersection()
4066 pEdge1->node1 == pEdge2->node2) && in _cvPar_OpenParIntersection()
4067 pEdge1->node1 != NULL)|| in _cvPar_OpenParIntersection()
4068 ((pEdge1->node2 == pEdge2->node1 || in _cvPar_OpenParIntersection()
4069 pEdge1->node2 == pEdge2->node2) && in _cvPar_OpenParIntersection()
4070 pEdge1->node2 != NULL)) in _cvPar_OpenParIntersection()
4073 float* Parabola1 = pEdge1->parabola->map; in _cvPar_OpenParIntersection()
4075 if(pEdge1->node1!=NULL) in _cvPar_OpenParIntersection()
4076 pPar1Point1 = &(pEdge1->node1->node); in _cvPar_OpenParIntersection()
4078 pPar1Point1 = &(pEdge1->node2->node); in _cvPar_OpenParIntersection()
4089 …if(pEdge1->parabola->directrice==pEdge2->parabola->directrice) //common site is segment -> differ… in _cvPar_OpenParIntersection()
4091 pCvPointFloat pFocus1 = &(pEdge1->parabola->focus->node); in _cvPar_OpenParIntersection()
4101 pCvVoronoiSite pDirectrice1 = pEdge1->parabola->directrice; in _cvPar_OpenParIntersection()
4139 float a1 = pEdge1->parabola->a; in _cvPar_OpenParIntersection()
4190 Radius = Point.y + 1.f/(4*pEdge1->parabola->a); in _cvPar_OpenParIntersection()
4200 float _cvPar_CloseParIntersection(pCvVoronoiEdge pEdge1, in _cvPar_CloseParIntersection() argument
4206 if(((pEdge1->node1 == pEdge2->node1 || in _cvPar_CloseParIntersection()
4207 pEdge1->node1 == pEdge2->node2) && in _cvPar_CloseParIntersection()
4208 pEdge1->node1 != NULL)|| in _cvPar_CloseParIntersection()
4209 ((pEdge1->node2 == pEdge2->node1 || in _cvPar_CloseParIntersection()
4210 pEdge1->node2 == pEdge2->node2) && in _cvPar_CloseParIntersection()
4211 pEdge1->node2 != NULL)) in _cvPar_CloseParIntersection()
4214 float* Parabola1 = pEdge1->parabola->map; in _cvPar_CloseParIntersection()
4217 if(pEdge1->node1!=NULL) in _cvPar_CloseParIntersection()
4218 pPar1Point1 = &(pEdge1->node1->node); in _cvPar_CloseParIntersection()
4220 pPar1Point1 = &(pEdge1->node2->node); in _cvPar_CloseParIntersection()
4227 …if(pEdge1->parabola->directrice==pEdge2->parabola->directrice) //common site is segment -> differ… in _cvPar_CloseParIntersection()
4229 pCvPointFloat pFocus1 = &(pEdge1->parabola->focus->node); in _cvPar_CloseParIntersection()
4239 pCvVoronoiSite pDirectrice1 = pEdge1->parabola->directrice; in _cvPar_CloseParIntersection()
4279 float a1 = pEdge1->parabola->a; in _cvPar_CloseParIntersection()
4356 pCvVoronoiEdge pEdge1) in _cvMakeTwinEdge() argument
4358 pEdge2->direction = pEdge1->direction; in _cvMakeTwinEdge()
4359 pEdge2->parabola = pEdge1->parabola; in _cvMakeTwinEdge()
4360 pEdge2->node1 = pEdge1->node2; in _cvMakeTwinEdge()
4361 pEdge2->twin_edge = pEdge1; in _cvMakeTwinEdge()
4362 pEdge1->twin_edge = pEdge2; in _cvMakeTwinEdge()
4521 pCvVoronoiEdge pEdge1, pEdge2; in _cvDivideRightEdge() local
4523 pEdge1 = _cvSeqPush(EdgeSeq, &Edge1); in _cvDivideRightEdge()
4526 if(pEdge1->next_edge != NULL) in _cvDivideRightEdge()
4527 pEdge1->next_edge->prev_edge = pEdge1; in _cvDivideRightEdge()
4528 pEdge1->prev_edge = NULL; in _cvDivideRightEdge()
4534 pEdge1->node1 = pEdge2->node2= pNode; in _cvDivideRightEdge()
4535 pEdge1->twin_edge = pEdge2; in _cvDivideRightEdge()
4536 pEdge2->twin_edge = pEdge1; in _cvDivideRightEdge()
4545 pCvVoronoiEdge pEdge1, pEdge2; in _cvDivideLeftEdge() local
4547 pEdge1 = _cvSeqPush(EdgeSeq, &Edge1); in _cvDivideLeftEdge()
4554 if(pEdge1->prev_edge != NULL) in _cvDivideLeftEdge()
4555 pEdge1->prev_edge->next_edge = pEdge1; in _cvDivideLeftEdge()
4556 pEdge1->next_edge = NULL; in _cvDivideLeftEdge()
4558 pEdge1->node2 = pEdge2->node1= pNode; in _cvDivideLeftEdge()
4559 pEdge1->twin_edge = pEdge2; in _cvDivideLeftEdge()
4560 pEdge2->twin_edge = pEdge1; in _cvDivideLeftEdge()