rust-cv / cv

Rust CV mono-repo. Contains pure-Rust dependencies which attempt to encapsulate the capability of OpenCV, OpenMVG, and vSLAM frameworks in a cohesive set of APIs.
858 stars 67 forks source link

Create corresponding tutorial chapter for geometric verification code #77

Open adamconkey opened 1 year ago

adamconkey commented 1 year ago

@vadixidav created code for a geometric verification tutorial which was slotted for a Chapter 5 tutorial, but there is no corresponding tutorial to describe it. This is a nice example to show a consensus algorithm (ARRSAC), and is a nice extension to the feature matching of Chapter 4 to demonstrate how the features can be utilized to infer camera motion. It would be nice to have the corresponding markdown description to solidify it as an example in the tutorial book.

adamconkey commented 1 year ago

I'm happy to take a crack at creating this tutorial page if you wish to assign it to me.

One question I have, is there ends up being some redundancy across the tutorial chapters (e.g. the code to save images, do symmetric feature matching, etc.). Do you like to have it that way to keep the tutorials self-contained, or would it be better to abstract some of this functionality, either in the tutorial code or have some utility functions in the cv framework to absorb the boilerplate in these common tasks? I imagine it would be useful to have a utility for annotating keypoints, drawing side-by-side images, drawing feature matches, etc.

I'd be interested to hear the maintainers' perspective on the goals of the tutorials. I find a lot of the tutorial code to include many details on these common tasks, while the core CV functions are well-encapsulated so there aren't actually as many details on the methods themselves. Are the tutorials intended to be more focused on basic usage of the CV features, or more educational about CV concepts grounded in using the CV functionality the repo offers?

xd009642 commented 1 year ago

Yeah feel free to get started on a tutorial. As for the common tutorial functions, I think some like symmetric matching could make sense to move into the crate so users don't have to write it as a convenience function, but some functions likely make less sense as they'll be very specific to the tutorial work.

I believe the tutorials should be focused on basic usage of the features the crate offers, but with basic information about the CV concepts where appropriate - and definitely enough info to act as a jumping off point to find more in-depth material. For example say we had a HOG feature extractor explaining the basics of what HOG features are and the usage of it but not putting in the mathematical details you'd see in education materials about it. Though this is largely vibes based from my perspective - so if a tutorial is very well written I think it likely has merit regardless of where the focus is (but should be shown using the API provided by cv crate).

adamconkey commented 1 year ago

FYI I started working on this on my fork branch tutorial_ch5_geometric_verification, the markdown is here. It's just slow-going for me because I'm learning some of these concepts/methods as I go.