mirror of
https://github.com/opencv/opencv.git
synced 2026-07-26 05:43:05 +04:00
59218f9edd
Geometry module #29175 OpenCV Contrib: https://github.com/opencv/opencv_contrib/pull/4129 CI changes: https://github.com/opencv/ci-gha-workflow/pull/313 Continues - https://github.com/opencv/opencv/pull/28804 - https://github.com/opencv/opencv/pull/29101 - https://github.com/opencv/opencv/pull/29108 - https://github.com/opencv/opencv/pull/28810 Todo for followup PRs: - [x] Rename doxygen groups - [x] Fix JS modules layout and whitelists - [ ] Sort tutorials code/snippets ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
44 lines
1.6 KiB
C++
44 lines
1.6 KiB
C++
// This file is part of OpenCV project.
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
// of this distribution and at http://opencv.org/license.html.
|
|
//
|
|
// Copyright (C) 2021, Wanli Zhong <zhongwl2018@mail.sustech.edu.cn>
|
|
|
|
#ifndef OPENCV_TEST_PTCLOUD_UTILS_HPP
|
|
#define OPENCV_TEST_PTCLOUD_UTILS_HPP
|
|
|
|
#include "test_precomp.hpp"
|
|
|
|
namespace opencv_test {
|
|
|
|
/**
|
|
* @brief Generate a specific plane with random points.
|
|
*
|
|
* @param[out] plane_pts Point cloud of plane, only support vector<Point3f> or Mat with Nx3 layout
|
|
* in memory.
|
|
* @param model Plane coefficient [a,b,c,d] means ax+by+cz+d=0.
|
|
* @param thr Generate the maximum distance from the point to the plane.
|
|
* @param num The number of points.
|
|
* @param limit The range of xyz coordinates of the generated plane.
|
|
*
|
|
*/
|
|
void generatePlane(OutputArray plane_pts, const vector<float> &model, float thr, int num,
|
|
const vector<float> &limit);
|
|
|
|
/**
|
|
* @brief Generate a specific sphere with random points.
|
|
*
|
|
* @param[out] sphere_pts Point cloud of plane, only support vector<Point3f> or Mat with Nx3 layout
|
|
* in memory.
|
|
* @param model Plane coefficient [a,b,c,d] means x^2+y^2+z^2=r^2.
|
|
* @param thr Generate the maximum distance from the point to the surface of sphere.
|
|
* @param num The number of points.
|
|
* @param limit The range of vector to make the generated sphere incomplete.
|
|
*
|
|
*/
|
|
void generateSphere(OutputArray sphere_pts, const vector<float> &model, float thr, int num,
|
|
const vector<float> &limit);
|
|
|
|
} // opencv_test
|
|
#endif //OPENCV_TEST_PTCLOUD_UTILS_HPP
|