0

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.......???

Ap00rv
  • 128
  • 1
  • 11

1 Answers1

0

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.

WillShackleford
  • 6,918
  • 2
  • 17
  • 33