On using the following code:-
Imgproc.rectangle(frame, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),new Scalar(0, 255, 0));
in netbeans 8 for face detection using OpenCV 3 I am having trouble in drawing a rectangle in Mat frame.
Netbeans says:-
incompatible type:cannot convert java.awt.point to org.opencv.core.point
I need help its for my Project can anybody solve it.......???
Near the top of your file, change:
import java.awt.Point;
to
import org.opencv.core.Point;
If you use the Fix Imports feature, be sure to carefully check the dialog and select the right package when it is importing a class found in multiple packages.