Skip to content

Commit 8c9a0d9

Browse files
committed
fixup! Merge remote-tracking branch 'upstream/4.x' into '5.x'
1 parent 4b9b0c1 commit 8c9a0d9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/bgsegm/test/test_backgroundsubtractor_gbh.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ void CV_BackgroundSubtractorTest::run(int)
2929
{
3030
int code = cvtest::TS::OK;
3131
RNG& rng = ts->get_rng();
32-
int type = ((unsigned int)rng)%7; //!< pick a random type, 0 - 6, defined in types_c.h
33-
int channels = 1 + ((unsigned int)rng)%4; //!< random number of channels from 1 to 4.
32+
int type = ((unsigned int)rng) % 3;
33+
type = (type == 0) ? CV_8U : (type == 1) ? CV_16U : CV_32F; // 8U, 16U, 32F
34+
int channels = ((unsigned int)rng)%3;
35+
channels = (channels == 2) ? 4 : channels; // 1, 3, 4
3436
int channelsAndType = CV_MAKETYPE(type,channels);
3537
int width = 2 + ((unsigned int)rng)%98; //!< Mat will be 2 to 100 in width and height
3638
int height = 2 + ((unsigned int)rng)%98;

0 commit comments

Comments
 (0)