lstahlman
> Mirrored from upstream: https://github.com/opencv/opencv/issues/28430 > Original author: @githublqss · created 2026-01-19T12:52:10Z > Upstream labels: _none_ > Selection: mirrored by mirror-issues.py --- I am trying to use this piece of code to generate the values of the three anchor variables std::vector<double> gamma_complete_anchor, gamma_incomplete_anchor, gamma_anchor in the constructor of the GammaValuesImpl class. This is my test code void inflateGammaValues( std::vector<double>& gamma_complete_anchor, std::vector<double>& gamma_incomplete_anchor, std::vector<double>& gamma_anchor, double max_thr=7.5, double gamma_quantile = 3.04, double DOF=2,int number_of_anchor_points=50) { //上不完全gamma gamma_complete_anchor= std::vector<double>(number_of_anchor_points), //下不完全gamma gamma_incomplete_anchor= std::vector<double>(number_of_anchor_points), //上不完全gamma gamma_anchor= std::vector<double>(number_of_anchor_points); const double step0 = max_thr / (number_of_anchor_points-1); const double step1 = max_thr* gamma_quantile / (number_of_anchor_points - 1); const double n_plus_1_div_2 = (DOF + 1.0) / 2.0; const double n_minus_1_div_2 = (DOF - 1.0) / 2.0; const double gamma_n_plus = boost::math::tgamma(n_plus_1_div_2); const double gamma_n_minus = boost::math::tgamma(n_minus_1_div_2); for (int i = 0; i < number_of_anchor_points; ++i) { gamma_complete_anchor[i]= boost::math::gamma_q(n_minus_1_div_2, step0 * i) * gamma_n_minus; gamma_incomplete_anchor[i] = boost::math::gamma_p(n_plus_1_div_2, step0 * i) * gamma_n_plus; gamma_anchor[i] = boost::math::gamma_q(n_minus_1_div_2, step1 * i) * gamma_n_minus; } } My current confusion is, if my guess is correct, why in the current code is scale_gamma_values not max_size_table_ / (gamma_quantile * max_thr)? Could you explain? onst int number_of_anchor_points = 50; std::vector<double> gamma_complete_anchor, gamma_incomplete_anchor, gamma_anchor; if (DoF == 2) { const double max_thr = 7.5, gamma_quantile = 3.04; scale_complete_values = max_size_table_ / max_thr; scale_gamma_values = gamma_quantile * max_size_table_ / max_thr ;