pub fn random_sampling_def(
sampled_pts: &mut impl ToOutputArray,
input_pts: &impl ToInputArray,
sampled_pts_size: i32,
) -> Result<()>Expand description
Point cloud sampling by randomly select points.
Use cv::randShuffle to shuffle the point index list, then take the points corresponding to the front part of the list.
§Parameters
- sampled_pts: Point cloud after sampling. Support cv::Mat(sampled_pts_size, 3, CV_32F), std::vectorcv::Point3f.
- input_pts: Original point cloud, vector of Point3 or Mat of size Nx3/3xN.
- sampled_pts_size: The desired point cloud size after sampling.
- rng: Optional random number generator used for cv::randShuffle; if it is nullptr, theRNG () is used instead.
§Note
This alternative version of random_sampling function uses the following default values for its arguments:
- rng: nullptr