Skip to content

Commit 37efea4

Browse files
authored
Using opencv's random function
1 parent b4c132b commit 37efea4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/ximgproc/src/globalmatting.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ void GlobalMatting::calculateAlphaPatchMatch(const cv::Mat_<cv::Vec3b> &image,
241241
for (int iter = 0; iter < 10; ++iter)
242242
{
243243
// propagation
244-
std::random_shuffle(coords.begin(), coords.end());
245-
244+
//std::random_shuffle(coords.begin(), coords.end());
245+
cv::randShuffle(coords);
246+
246247
for (std::size_t i = 0; i < coords.size(); ++i)
247248
{
248249
const cv::Point &p = coords[i];

0 commit comments

Comments
 (0)