@ -182,10 +182,10 @@ void FastLineDetectorImpl::drawSegments(InputOutputArray _image, InputArray line
getAngle ( seg ) ;
getAngle ( seg ) ;
double ang = ( double ) seg . angle ;
double ang = ( double ) seg . angle ;
Point2i p1 ;
Point2i p1 ;
p1 . x = ( int ) r ound( seg . x2 - gap * cos ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . x = cvR ound( seg . x2 - gap * cos ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . y = ( int ) r ound( seg . y2 - gap * sin ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . y = cvR ound( seg . y2 - gap * sin ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
pointInboardTest ( _image . getMatRef ( ) , p1 ) ;
pointInboardTest ( _image . getMatRef ( ) , p1 ) ;
line ( _image . getMatRef ( ) , Point ( ( int ) r ound( seg . x2 ) , ( int ) r ound( seg . y2 ) ) , p1 , Scalar ( 0 , 0 , 255 ) , 1 ) ;
line ( _image . getMatRef ( ) , Point ( cvR ound( seg . x2 ) , cvR ound( seg . y2 ) ) , p1 , Scalar ( 0 , 0 , 255 ) , 1 ) ;
}
}
}
}
}
}
@ -717,14 +717,14 @@ void FastLineDetectorImpl::drawSegment(Mat& mat, const SEGMENT& seg, Scalar bgr,
double arrow_angle = 30.0 ;
double arrow_angle = 30.0 ;
Point2i p1 ;
Point2i p1 ;
p1 . x = ( int ) r ound( seg . x2 - gap * cos ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . x = cvR ound( seg . x2 - gap * cos ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . y = ( int ) r ound( seg . y2 - gap * sin ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
p1 . y = cvR ound( seg . y2 - gap * sin ( arrow_angle * CV_PI / 180.0 + ang ) ) ;
pointInboardTest ( mat , p1 ) ;
pointInboardTest ( mat , p1 ) ;
line ( mat , Point ( ( int ) r ound( seg . x1 ) , ( int ) r ound( seg . y1 ) ) ,
line ( mat , Point ( cvR ound( seg . x1 ) , cvR ound( seg . y1 ) ) ,
Point ( ( int ) r ound( seg . x2 ) , ( int ) r ound( seg . y2 ) ) , bgr , thickness , 1 ) ;
Point ( cvR ound( seg . x2 ) , cvR ound( seg . y2 ) ) , bgr , thickness , 1 ) ;
if ( directed )
if ( directed )
line ( mat , Point ( ( int ) r ound( seg . x2 ) , ( int ) r ound( seg . y2 ) ) , p1 , bgr , thickness , 1 ) ;
line ( mat , Point ( cvR ound( seg . x2 ) , cvR ound( seg . y2 ) ) , p1 , bgr , thickness , 1 ) ;
}
}
} // namespace cv
} // namespace cv
} // namespace ximgproc
} // namespace ximgproc