[Kwiver-users] Bounding Box Issues

Matt Brown matt.brown at kitware.com
Mon Mar 11 12:55:38 EDT 2019


Until we refactor according to Matt L.'s suggested changes, one remaining
problem is that in cases where two bounding boxes don't intersect,
intersect() can still return a bounding box that has bottom-right >
top-left, indicating it is a non-empty box, but those top-left and
bottom-right coordinates are garbage values that you would need to look
into Eigen::AlignedBox and query isEmpty() to know whether it is valid.
Presumably the solution in intersection() is to check isEmpty() on the
Eigen::AlignedBox and if it is, generate a bounding box with top-left >
bottom-right. That is why it might be convenient to define a function
generate an empty bounding_box, perhaps compliant with Roddy's specified
vgl_intersection convention for an empty box.

On Mon, Mar 11, 2019 at 12:11 PM Matt Leotta <matt.leotta at kitware.com>
wrote:

>
>
> On Mon, Mar 11, 2019 at 11:59 AM Matt Brown <matt.brown at kitware.com>
> wrote:
>
>> You should not hit this case.  This is a bounding box, not a polygon.
>>> You should warp the corners of this box (or other data within) and then
>>> compute a new bounding box on the warped points.
>>>
>> Maybe this is contrived, but as an example, let's say you are working
>> with orbiting WAMI data and you warp a raw-image bbox from one side of the
>> orbit to a raw image from the other side of the orbit. The top/left and
>> bottom/right corners may get inverted so that top/left > bottom/right. If
>> you naively generated a new bbox with that top/left and bottom/right
>> specification, the new bbox encodes empty. Is it the detection-warping-code
>> implementer's responsibility to manage this accordingly?
>>
>> The right way to do this is to warp all four corner points and then add
> them to a new empty box with the "extend()" function to recompute the new
> box.
>


-- 
Matt Brown, Ph.D.
Staff R&D Engineer
Kitware, Inc.
101 E Weaver St. Suite G4
Carrboro, NC 27510
(908) 910-3385
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/kwiver-users/attachments/20190311/7d5f267f/attachment.html>


More information about the Kwiver-users mailing list