I'm lacking hugin knowledge on the first sub-problem below, but I think your problem breaks down into four easy sub-problems. Then is there a specific one of those you need help with?
1) You need hfov in the same units as y and p. I don't know if it already is, or if it needs some additional value (assumed subject distance) in order to convert. You need r and aspect ratio in units you understand.
2) Given (1), it should be easy to compute the y,p coordinate position of each corner of each image.
3) Google and/or StackOverflow can easily be searched for a formula for "is point in quadrangle". That can be used to tell whether a corner of one image is in the quadrangle of the other. Assuming no lens correction was used, two images overlap if and only if some corner of the second is within the quadrangle of the first. (First vs. second works either way and only one of the two ways needs to be tested).
4) You could (and I think should) just "brute force" the testing: Do all 4*N*(N-1)/2 tests, meaning each corner of each image tested against the quadrangle of each earlier image. In game writing tutorials you might be able to understand some very complicated approaches to proximity sorting that reduce the problem to 8*N*Log(N). But that massive research effort would only have value if you were working with a set of over 30 thousand images.