when I read opencv source code, I found that image stitching is using maximum span tree to stitch all images together, So I decided to implement minimum span tree algorithm again with opencv code style (little bit not much), it's not too hard to implement, if you just know about minimum span tree, you can just write code without google help.