[Kwiver-users] Bounding Box Issues

Matt Brown matt.brown at kitware.com
Mon Mar 11 10:18:44 EDT 2019


>
> It sounds like maybe we need to check "isEmpty()" on the box before
> computing the area, and return 0 for empty boxes.
>
Yeah, I was thinking that would be part of the solution, but every aspect
of the bounding box (e.g., top-left/bottom-right coordinates) is invalid
when it is empty. When empty, AlignBox still populates those elements but
with undefined values, and these get passed on to the Vital bounding_box,
allowing the user to query lower_right() and receive undefined values. So,
we should either define an empty bounding box subclass, perhaps that
returns an error when you ask for lower_right() and forces the programmer
to first check isEmpty(), or the intersection function should return a
special value when there is no intersection.


> By the way, I'm not a fan of having this bounding box class in KWIVER that
> simply wraps Eigen::AlignBox, but only exposes a subset of its functions.
> I think we should just use Eigen::AlignBox and possibly some typedefs for
> it if we want to call it "bounding_box".  Or we could derive a subclass if
> we need to add some additional methods.  There is no reason to hide all the
> other functionality of AlignBox.  This is a separate discussion to have
> some time.
>
Yes, I see your point. Would like to have this discussion some time in the
near future.

Best,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/kwiver-users/attachments/20190311/cffa7d94/attachment.html>


More information about the Kwiver-users mailing list