Java intersect, merge Rect -s

asked Feb 1 '15

mucdev gravatar image

Hi all,

in my application i need to check for intersection and merge the rectangles. In the API of Rect java-class there's some instructions showing how to intersection and merge, as seen:

rect = rect1 & rect2 (rectangle intersection)
rect = rect1 | rect2 (minimum area rectangle containing rect2 and rect3 )

I did try in Eclipse, Java but it's failed:

The operator & is undefined for the argument type(s) org.opencv.core.Rect, org.opencv.core.Rect

Thanks for any help!

Preview: (hide)

Comments

If there's still no answer on this question, i'll plan to create a JNI-util for all kinds of the same stuffs.

mucdev gravatar imagemucdev (Feb 2 '15)edit