How to draw a rectangle on CameraBridgeViewBase in android opencv 3.1

I try this in CameraFrame

// TODO Auto-generated method stub
mRgba = inputFrame.rgba();
Imgproc.rectangle(mRgba, new Point(10, 10), new Point(20, 20),new Scalar(0, 255, 0));
Imgproc.putText(mRgba, "====", new Point(10,10), 3, 1, new Scalar(255, 0, 0, 255), 2);
return mRgba;

The application compiles but it stops working on the device. I think there is a problem with new Point (,), but I am unsure if that really is the cause.

Upvotes: 0

Views: 809

Answers (1)

Mehmet Hanoğlu
Mehmet Hanoğlu

Reputation: 3732

I tried your codes, seems no problem. Open "Android Monitor" for debugging.

Upvotes: 1

Related Questions