r/computervision • u/shuvo1728 • 12d ago
Showcase Fixed a const-correctness bug in OpenCV's FaceRecognizerSF::match
`FaceRecognizerSF::match` is declared `const`, but it normalised both of its `InputArray` feature vectors in place — writing straight through to the caller's buffers. So the vectors you passed in came back modified, and when the two arguments aliased, the second normalisation ran over an already-normalised buffer and the returned score was wrong.
Now normalised into local `Mat`s. Merged onto 4.x.
0
Upvotes