Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Shift a rect by a certain offset in openCV4Android

Here,opencv docs say:

In addition to the class members, the following operations on rectangles are implemented:

rect = rect + point (shifting a rectangle by a certain offset)

...

I want to use this in openCV4Android.So I did like this:

Rect r = new Rect(...);
r + new Point(4,5);

But this error occurs:

Type mismatch: cannot convert from Point to Rect

Did I do wrong or it (shifting a rectangle by a certain offset in openCV4Android) or it is not possible and I have to declare Rect again?