efe2ab9288b17800bf3f184cbf332a16bec38a1c Added sample to stitch images together.
This works only for a few images. The stitching process must be further adjusted.
OpenCvSharp does not expose enough of the stitching api of opencv, which is why EMGU is used. For example I could not find HomographyBasedEstimator, BundleAdjusterRay and so on in OpenCVSharp.
The StichPhotos2 Method explains the overall steps, which are used to stitch photos together.
d273f8ca0bab00d60d43d911103b9e0fd0eabb74 added a manual stitching method to test getting a proper homography between two images.
The implementation is based upon https://stackoverflow.com/questions/53079167/emgucv-opencv-orbdetector-finding-only-bad-matches
It works much better than all of my manual implementations, see comparison between Good and Bad Feature Matching images.
Major takeaways are: Request many features from ORB - not just the default amount. Lowes algorithm is implemented in Features2DToolbox. KNN matchings needs to have the model descriptors added before calling KnnMatch.
http://6.869.csail.mit.edu/fa12/lectures/lecture13ransac/lecture13ransac.pdf is a good description of how feature mapping works.
b4717fb4da427b93a38f69ea72e6ebb49a6d1a13 cleanup of code and proper disposing of opencv objects - the testhost still does not exit blocking the project from building again.
As soon as DetectAndCompute is run from the feature detector this problems occurs. The same problem occured when using OpenCVSharp and not EMGU
f05a8ee4e2e68029092b015f7f56b7acc8bde7e5 Photos are now aligned properly by translating the homography such that a border can be added to the original image. The border is necessary, else pixels might go out of bounds after warping the perspective.
The current problem is the perspective change, which leads to gaps when overlapping the images. Maybe calculate better Homography?
Commit messages for #113
The StichPhotos2 Method explains the overall steps, which are used to stitch photos together.