Java intersect, merge Rect -s

asked 2015-02-01 10:41:23 -0600

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!

edit retag flag offensive close merge delete


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 ( 2015-02-02 05:57:38 -0600 )edit