mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #26259 from Kumataro:fix26258
core: C-API cleanup: RNG algorithms in core(4.x) #26259 - replace CV_RAND_UNI and NORMAL to cv::RNG::UNIFORM and cv::RNG::NORMAL. ### 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 - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
@@ -650,8 +650,8 @@ void Core_ArrayOpTest::run( int /* start_from */)
|
||||
MatND A(3, sz3, CV_32F), B(3, sz3, CV_16SC4);
|
||||
CvMatND matA = cvMatND(A), matB = cvMatND(B);
|
||||
RNG rng;
|
||||
rng.fill(A, CV_RAND_UNI, Scalar::all(-10), Scalar::all(10));
|
||||
rng.fill(B, CV_RAND_UNI, Scalar::all(-10), Scalar::all(10));
|
||||
rng.fill(A, RNG::UNIFORM, Scalar::all(-10), Scalar::all(10));
|
||||
rng.fill(B, RNG::UNIFORM, Scalar::all(-10), Scalar::all(10));
|
||||
|
||||
int idx0[] = {3,4,5}, idx1[] = {0, 9, 7};
|
||||
float val0 = 130;
|
||||
@@ -807,7 +807,7 @@ void Core_ArrayOpTest::run( int /* start_from */)
|
||||
all_vals.resize(nz0);
|
||||
all_vals2.resize(nz0);
|
||||
Mat_<double> _all_vals(all_vals), _all_vals2(all_vals2);
|
||||
rng.fill(_all_vals, CV_RAND_UNI, Scalar(-1000), Scalar(1000));
|
||||
rng.fill(_all_vals, RNG::UNIFORM, Scalar(-1000), Scalar(1000));
|
||||
if( depth == CV_32F )
|
||||
{
|
||||
Mat _all_vals_f;
|
||||
|
||||
Reference in New Issue
Block a user