The direction vector I’m talking about is the vector from the centre of the
camera sensor to the distant point the camera is pointing directly at.

You can think of this distant point as the object targeted by the centre
focus point of your camera

Since your camera is aligned… meaning you take one shot then rotate left or
right until you cover 360 degrees, you don’t have to do further
calculations

If the images are randomly rotated, then you have to do more complicated
computations… I use a shader to brute force the result, you can think of
this as shooting a ray from the image A camera origin to each image A pixel
and seeing if it intersects with image B. However to do this you need depth
information



On Fri, 21 Jan 2022 at 12:57 AM, chaosjug <[email protected]> wrote:

> My interpretation of "direction vector" seems to be different. Not sure
> what
> aCuria meant, because using r for the vector does not make sense to me. I
> thought I would just take y and p as vector in spherical coordinate and
> then
> compute the delta angle. For your example this would lead to a delta angle
> of
> 8 degrees.
>
> Am Donnerstag, 20. Januar 2022, 17:44:36 CET schrieb [email protected]:
> > My method does fail to cover the case that any image has y or p values
> > crossing 180 degrees (meaning directly behind the viewpoint of the
> > panorama).  I didn't think that case needed to be covered.
> >
> > Crossing the 360 point of direction relative to the origin, is an
> ordinary
> > condition that would need to be covered.  But that was not the problem I
> > was pointing out.
> >
> > Consider an example:
> > Photo A has yaw minus 4 degrees, pitch 0 and hfov 10 degrees.  Photo B
> has
> > yaw plus 4 degrees, pitch 0 and hfov 10 degrees.  Clearly they overlap.
> > But A has direction vector at minus 90 degrees, while B has direction
> > vector at plus 90 degrees, so they are 180 degrees apart and only 10
> > degrees wide, so if you thought those angles were comparable measures,
> you
> > would think the images did not overlap.
> >
> > On Thursday, January 20, 2022 at 11:26:49 AM UTC-5 chaosjug wrote:
> > > Not sure if I get your point. The images are not circles so hfov is
> only
> > > an
> > > estimate. The right value would be something between hfov and vfov I
> > > guess.
> > > But why is the origin special? Of course I would need to make sure to
> > > calculate the angle between 359° and 1° as 2°. But that is even more
> > > tricky
> > > when implementing your version with quadrangles. I'm pretty sure there
> is
> > > some
> > > sort of transformation to avoid those problem...
> > >
> > > Am Donnerstag, 20. Januar 2022, 17:15:47 CET schrieb
> [email protected]:
> > > > The angles compared in your step 3 aren't actually in comparable
> units.
> > >
> > > So
> > >
> > > > your method would miss overlaps near the origin (where two photos
> each
> > >
> > > have
> > >
> > > > small y and p values but opposite signs on their y and p values).
> > > >
> > > > On Thursday, January 20, 2022 at 11:04:47 AM UTC-5
> [email protected]
> > >
> > > wrote:
> > > > > Pseudocode:
> > > > > 1) convert y p r to a direction vector
> > > > > 2) compute angle between two direction vectors A and B
> > > > > 3) compare angle to hfovA/2 + hfovB/2
> > > > > 4) if the angle is smaller it’s possible it overlaps. Must check
> > >
> > > rotation
> > >
> > > > > of the two images to be sure
> > > > >
> > > > > On Thu, 20 Jan 2022 at 10:37 PM, chaosjug <[email protected]> wrote:
> > > > >> Hi,
> > > > >>
> > > > >> does someone have the formulas or a code example how to calculate
> if
> > > > >> images
> > > > >> overlap? So starting with y,p,r,hfov and aspect ratio. I only
> need an
> > > > >> estimate, so I hope I can neglect the lens type.
> > > > >>
> > > > >> Regards
> > > > >> Stephan
>
>
>
>
> --
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> ---
> You received this message because you are subscribed to the Google Groups
> "hugin and other free panoramic software" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hugin-ptx/1944974.PYKUYFuaPT%40chaos-home
> .
>

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/CAM_uak4-VhV4PadQyyvc-cXEUsjx_dQw%3Dt2HKKOaep1-iUt31Q%40mail.gmail.com.

Reply via email to