I have openCV-3.0.0 alpha and I found a sample code on the openCV tutorials website. I used to same code and compiled it, but eclipse tells me that the rectangle()
method in the org.opencv.core.Core
class cannot be found. I checked the class myself and indeed could not find this method. Does anyone know in which class this method is now stored in? I found a similar problem with the org.opencv.highgui.Highgui
class which was discontinued in the openCV-3.0.0 and replaced by org.opencv.imgcodecs.Imgcodecs
it is found in org.opencv.imgproc.Imgproc
package, e.g.
Imgproc.rectangle(webcam_img, null, null, null);
in OpenCV 3.0.0 you should change
import org.opencv.highgui.Highgui;
to import org.opencv.imgcodecs.Imgcodecs;
, Highgui.imread()
to imgcodecs.imread()
, Core.rectangle()
to imgproc.rectangle()
, Highgui.imwrite()
to imgcodecs.imwrite()
take a look at this link https://fossies.org/diffs/opencv/2.4.11_vs_3.0.0-rc1/samples/java/sbt/src/main/java/DetectFaceDemo.java-diff.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With