Core.rectangle returns 无法解决 openCv 3.0 中的方法错误

Core.rectangle returns can not resolve method error in openCv 3.0

在 OpenCv 3.0 中,我遵循了关于此 page 的人脸检测教程,但是这一行

Core.rectangle(frame, facesArray[i].tl(), facesArray[i].br(), new Scalar(0, 255, 0, 255), 3);

returns 错误

Error:(205, 21) java: cannot find symbol
symbol:   method rectangle(org.opencv.core.Mat,org.opencv.core.Point,org.opencv.core.Point,org.opencv.core.Scalar,int)
location: class org.opencv.core.Core

opencv更新到3.0,部分功能发生变化。 所以将函数从 Core.rectangle 更改为 Imgproc.rectangle

如果你还想使用core.rectangle..我建议你使用OpenCV 2.4.10。图书馆。与 3.0.0 没有太大区别..