mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 08:44:11 +08:00
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
This commit is contained in:

committed by
Alexander Alekhin

parent
84f761bf27
commit
71191e36d6
@@ -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++;
|
||||
|
||||
|
Reference in New Issue
Block a user