提交 16687a26 编写于 作者: A Andrey Kamaev

Explicitly use double precision sin & cos in hough implementation

On some platforms sin and cos are calculated in single precision resulting in
diversity of results.
上级 6bc79530
......@@ -118,8 +118,8 @@ icvHoughLinesStandard( const CvMat* img, float rho, float theta,
float ang = 0;
for(int n = 0; n < numangle; ang += theta, n++ )
{
tabSin[n] = (float)(sin(ang) * irho);
tabCos[n] = (float)(cos(ang) * irho);
tabSin[n] = (float)(sin((double)ang) * irho);
tabCos[n] = (float)(cos((double)ang) * irho);
}
// stage 1. fill accumulator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册