Question for BackgroundSubtractorGMG

asked 2019-09-22 21:19:30 -0500

g9164313 gravatar image

updated 2019-09-23 21:00:26 -0500

In file, bgfg_gmg.cpp, line 375,

int nfeatures = nfeatures_row[x];

The variable should be changed by function, 'insertFeature', otherwise 'nfeatures_' is always zeros.

Is it right?

Should I change this line into:

int& nfeatures = nfeatures_row[x];'

because the function, 'insertFeature' is defined as:

static bool insertFeature(int color, float weight, int* colors, float* weights, int& nfeatures, int maxFeatures)

If we used line one, it will update by the variable, 'nfeatures', not refer to 'nfeatures_'.

System information (version)
  • OpenCV => :grey_question: 3.4.5
  • Operating System / Platform => :grey_question: ubuntu 16.04
  • Compiler => :grey_question: gcc 5.4.0
edit retag flag offensive close merge delete