<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 10:27 AM Arslan Basharat via Kwiver-users <<a href="mailto:kwiver-users@public.kitware.com">kwiver-users@public.kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">intersection() could throw a warning that one of the boxes is empty, but it should still return 0 intersection area, I would think. <div><br></div><div>Is there a reason to utilize bounding_box class to also support boxes that are not axis aligned, which is all Eigen::AlignBox supports?</div></div></blockquote><div><br></div><div>Good point. We've had issues before with prematurely locking things to integers (may have been bounding boxes in vidtk, actually, maybe something else like image coordinates?).
Unless the purpose of the bounding box concept in this case is a
purposeful optimization we may want to have floating-point bounding
boxes otherwise stacked transformations will also have stacked
integer-casting errors.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>-Arslan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 10:19 AM Matt Brown via Kwiver-users <<a href="mailto:kwiver-users@public.kitware.com" target="_blank">kwiver-users@public.kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>It sounds like maybe we need to check "isEmpty()" on the box before computing the area, and return 0 for empty boxes.</div></div></blockquote><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>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.</div></div></blockquote><div>Yes, I see your point. Would like to have this discussion some time in the near future.</div><div><br></div><div>Best,</div><div>Matt</div></div></div>
_______________________________________________<br>
Kwiver-users mailing list<br>
<a href="mailto:Kwiver-users@public.kitware.com" target="_blank">Kwiver-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/kwiver-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/kwiver-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kwiver-users mailing list<br>
<a href="mailto:Kwiver-users@public.kitware.com" target="_blank">Kwiver-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/kwiver-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/kwiver-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Paul Tunison<br></div><div>Senior R&D Engineer, Computer Vision<br>Kitware, Inc.<br>1712 Route 9, Suite 300<br>Clifton Park, NY 12065 USA<br><br>Phone: (518) 371-3971 Ext.1164</div></div></div></div></div></div></div></div></div>