Skip to content

Commit ea84c59

Browse files
committed
clamped BRISQUE output to 0-100
1 parent 1c60ce3 commit ea84c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/quality/src/qualitybrisque.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ namespace
230230

231231
cv::Mat result;
232232
model->predict(feat_mat, result);
233-
return result.at<float>(0);
233+
return std::min( std::max( result.at<float>(0), 0.f ), 100.f ); // clamp to [0-100]
234234
}
235235

236236
// computes score for a single frame

0 commit comments

Comments
 (0)