[Kwiver-users] Bounding Box Issues

Matt Leotta matt.leotta at kitware.com
Mon Mar 11 10:55:28 EDT 2019


I'm not sure what you mean by "properly encodes empty".  The box does
encode empty by having at least one max point less then its min point.
There is a function isEmpty() that checks if a box is empty.  I've used
bound box classes in several libraries that all work this way.  It is the
user's responsibility to check if a box is empty (call isEmpty()) before
doing any operations that require a valid box.  I'm not sure there is a
better approach here, except maybe that the area/volume of an empty box
should return 0.


On Mon, Mar 11, 2019 at 10:46 AM Matt Brown <matt.brown at kitware.com> wrote:

> intersection() could throw a warning that one of the boxes is empty, but
>> it should still return 0 intersection area, I would think.
>>
> The issue is, intersection() returns a bounding box, not an area. So there
> isn't a clear ideal way to return a bounding box that properly encodes
> "empty." Right now, it returns a bounding box with all properties populated
> in an undefined manner.
>
>
>> Is there a reason to utilize bounding_box class to also support boxes
>> that are not axis aligned, which is all Eigen::AlignBox supports?
>>
> I think non-axis-aligned bounding boxes might have utility in the future,
> but bounding_box is currently configured to only specify axis-aligned
> boxes. So, we would have to completely redefine the interface to
> bounding_box to support non-axis-aligned boxes.
>
> ~Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/kwiver-users/attachments/20190311/350be312/attachment.html>


More information about the Kwiver-users mailing list