Declaration of `double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)` is moved to `"opencv2/imgproc.hpp"` in latest OpenCV. It's recommended to include the corresponding `imgproc` module in the future.