Commit 71191e36 authored by yomna-safaa's avatar yomna-safaa Committed by Alexander Alekhin

Merge pull request #1583 from yomna-safaa:ppf-fix-seg-fault

* fixed bug when norm less than eps where float array elements were left uninitialized

* cast double to float in fixing ppf norm=0 segmantation fault

* set array values 3,4,5 for normals = 0 in case of norm<eps to fix ppf segmentation fault bug
parent 84f761bf
......@@ -442,6 +442,12 @@ Mat samplePCByQuantization(Mat pc, Vec2f& xrange, Vec2f& yrange, Vec2f& zrange,
pcData[4]=(float)(ny/norm);
pcData[5]=(float)(nz/norm);
}
else
{
pcData[3]=0.0f;
pcData[4]=0.0f;
pcData[5]=0.0f;
}
//#pragma omp atomic
c++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment