out = rectint(A, B)
| Parameter | Description |
|---|---|
| A | an M-by-4 matrix; each row is a rectangle [x y width height]. |
| B | an N-by-4 matrix; each row is a rectangle [x y width height]. |
| Parameter | Description |
|---|---|
| out | an M-by-N matrix; out(i, j) is the area of the intersection of rectangle A(i, :) and rectangle B(j, :). |
rectint returns the area of intersection of rectangles. Each rectangle is given as a four-element row [x y width height], where (x, y) is a corner and width and height are the side lengths. Rectangles that do not overlap contribute a zero area.
area = rectint([0 0 1 1], [0.5 0.5 1 1])
| Version | Description |
|---|---|
| 2.0.0 | Initial version. |