there are plenty of articles that explain stitching in theory and in practice. OpenCV docs explain the stitching module’s facilities.
you presented an error. does that actually happen? if yes, what do you do that makes it happen? if it doesn’t actually happen, why did you present that error? what is its significance?