Modify randomSampling in point cloud

This commit is contained in:
Wanli Zhong 2022-05-11 15:30:58 +08:00 committed by GitHub
parent 6bffbe4938
commit 627e6a0447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ randomSampling(OutputArray sampled_pts, InputArray input_pts, const int sampled_
for (int i = 0; i < ori_pts_size; ++i) pts_idxs[i] = i;
randShuffle(pts_idxs, 1, rng);
int channels = input_pts.channels();
int channels = sampled_pts.channels();
if (channels == 3 && sampled_pts.isVector())
{
// std::vector<cv::Point3f>
@ -365,4 +365,4 @@ int farthestPointSampling(OutputArray sampled_point_flags, InputArray input_pts,
} // farthestPointSampling()
//! @} _3d
} //end namespace cv
} //end namespace cv