I have IR videos from a drone with very little image distortion or rotation. The video follows small prey (rabbits) and dogs in a field. I am careful not to change the heading or altitude of the drone, and at the height I am using there is no significant distortion. The video is basically orthographic. The background is brush with mowed lanes, so there are no sharp features. I pull the video apart into 0.5 fps images.
I want to stitch them together. When I use cv2.Stitcher.create(cv2.Stitcher_PANORAMA). (I also tried Stitcher_SCANS, too.) It work to a point, about 20 images, then images are stitched in at different rotation angles, so the result is warped, with some misplaced images.
I looked for stitching with image transformation, and the only thing I could come up with is hstack, vstack, and grid. The problem is that the video is following the random movements of prey and dog, so I can’t organize them into a grid.
Question: How can I use Stitcher without a step of rotation, skew, or scale of the images? I just want to slide them horizontally and vertical until they match, then blend.
can you provide a set of data and code that reproduces the issue?
my guess: the images are too featureless for automatic stitching.
you should also expect moving objects (animals) in the pictures to possibly confuse the stitcher. not saying it’s necessarily the case, but it’s a possibility. depends on the data.
Here is an example of a frame. The black is where I have masked out drone information. In the middle grid you can see the white (hot) of a person, a dog (elongated) and a rabbit (a dot). I don’t think those interfere with the stitching because they are a small part of the image. You can see the field has few sharp features that traditional feature extraction would work on.
The stitching works well with some groups of frames, then adding a few more will drastically distort the output.
all the masked out stuff probably confuses the module. see if you can find a way to pass these masks explicitly. it’s not going to treat “black” to be anything other than regular image content.
you should look for a way get a “clean feed” of the drone view.
Thanks. I am working on getting s clean feed right off of the drone instead of the controller.
I’ll look at the link. I am having trouble finding good documentation/tutorials. For example the documentation mentions Stitcher_PANORAMA or Stitcher_SCANS, but I can’t find details of what each flag does in detail.