Low Quality Air Stitching with OpenCV

I've been trying to stitch low-quality, low-resolution (320x180) images taken with a quadcopter in OpenCV recently. Here is what I got:

http://postimg.org/gallery/1rqsycyk/

The pictures taken are almost nadir and, as you see, overlap a lot. There is a translation between each shot, and I tried to place objects on the ground that keep the scene almost flat so as not to violate the requirements for homography. In any case, the stitching process does not take into account a large number of photographs.

Here is another example (only three images are sewn together):

http://postimg.org/gallery/1wpt3lmo/

I use the Surf Featuredetector and believe that poor image quality is not suitable for it, but I'm not sure about that.

Here is the code that I use, I found it on a similar issue of OpenCV non-rotational stitching and decided to use it because it worked better than mine:

Mat pano; Stitcher stitcher = Stitcher::createDefault(false); stitcher.setWarper(new PlaneWarper()); stitcher.setFeaturesFinder(new detail::SurfFeaturesFinder(1000,3,4,3,4)); stitcher.setRegistrationResol(0.1); stitcher.setSeamEstimationResol(0.1); stitcher.setCompositingResol(1); stitcher.setPanoConfidenceThresh(1); stitcher.setWaveCorrection(true); stitcher.setWaveCorrectKind(detail::WAVE_CORRECT_HORIZ); stitcher.setFeaturesMatcher(new detail::BestOf2NearestMatcher(false,0.3)); stitcher.setBundleAdjuster(new detail::BundleAdjusterRay()); Stitcher::Status status = Stitcher::ERR_NEED_MORE_IMGS; try{ status = stitcher.stitch(picturesTaken, pano); } catch(cv::Exception e){} 

My other suggestion is to do the manual stitching process instead of using the Stitcher class, but I'm not sure if it will change much. Therefore, the question arises: how can I make the stitching process more reliable, despite the poor image quality? Also: Does ROI only determine the impact on performance, as well as the likelihood of actual stitching?

+4
source share
3 answers

The result is not so bad considering the quality of the input images!

To improve the quality of the output, I would do (in order of priority):

  • camera distortion assessment to correct and simplify comparison
  • perform a histogram or alignment of lighting before stitching
  • try to increase the time gap between the pictures or use a different seam. Part of the blur at the output is created using a line when combining images in areas of overlap.
+3
source

I believe the problem is that you are taking pictures without textures, and it’s hard to extract good distinctive key points from such smooth areas.

+2
source

I found this question that helped me a lot. I am researching this topic and I have some tips for you:

About finding similar images:

  • You set SURFFeatureFidner with minHessian = 1000. This is really a big value (OpenCV offers 300, I sometimes use 100). That is why there are only matches not all images.
  • You set PanoConfidendceThresh to "1", maybe you need to set it to "0.8", it will embroider more images.

About looking at stitched images: There is another feature in the Stitcher pipeline. Try using:

  • stitcher.setSeamFinder (new part :: GraphCutSeamFinder (GraphCutSeamFinderBase :: COST_COLOR))

  • stitcher.setBlender (detail :: Blender :: createDefault (Blender :: MULTI_BAND, false))

  • stitcher.setExposureCompensator (more info :: ExposureCompensator :: createDefault (ExposureCompensator :: GAIN_BLOCKS))

Maybe it will be useful for you!

+2
source

Source: https://habr.com/ru/post/1498388/


All Articles