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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.