Update optical_flow.cpp

ref: push_back is changed to emplace_back in order to avoid unnecessary conversions [Scalar(r, g, b))] .
This commit is contained in:
Kababey 2025-02-11 13:30:48 +03:00 committed by GitHub
parent 7eaddb8aa4
commit 2364f4b0b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,7 @@ int main(int argc, char **argv)
int r = rng.uniform(0, 256);
int g = rng.uniform(0, 256);
int b = rng.uniform(0, 256);
colors.push_back(Scalar(r,g,b));
colors.emplace_back(r,g,b);
}
Mat old_frame, old_gray;