Image Stitcher return match graph

I’m using the high level image stitch class. It doesn’t always match the images with the default settings.

My goal is to ensure that the stitcher matches the maximum number of images (ideally all, for pano).

I was planning to create a loop. Upon each iteration, if the stitch doesn’t include all images, try again with a lower threshold. Based on the docs, I think the easiest way to retrieve the number of images stitched is through the match graph.

Is there a way to access the match graph from the high level stitcher class? Code would be appreciated.