public double computeOverlap ( ImageRectangle a , ImageRectangle b ) { if ( ! a . intersection ( b , work ) ) return 0 ; int areaI = work . area ( ) ; int bottom = a . area ( ) + b . area ( ) - areaI ; return areaI / ( double ) bottom ; }
Computes the fractional area of intersection between the two regions .