Skip to content

Instantly share code, notes, and snippets.

@rexagod
Last active February 27, 2020 20:17
Show Gist options
  • Save rexagod/4174d9aa74ba1c8842aaea14b78efd42 to your computer and use it in GitHub Desktop.
Save rexagod/4174d9aa74ba1c8842aaea14b78efd42 to your computer and use it in GitHub Desktop.
The project was divided into two parts, namely, building a `matcher.js` library and revamping Public Lab's `Leaflet.DistortableImage` repository, a helper module for `Mapknitter`.

Google Summer of Code 2019 Public Lab Final Work Product: Pranshu Srivastava

Project Details

Project Description

matcher-core essentially employs the ORB(Oriented FAST and Rotated BRIEF) algorithm to mine patterns using the well-known FAST(Features from Accelerated Segment Test) keypoint detector and the BRIEF(Binary Robust Independent Elementary Features) descriptor technologies, which provide appreciable performance boosts on low computational costs.

A Node-based CLI utility for headlessly testing custom matcher-core configurations, this module eases any development process on the matcher-core library by allowing the user to run a set of commands on their locally deployed Chromium environment in a headless manner, i.e., right from the CLI, without the need to open the browser whatsoever, be it testing, demonstration, debugging issues, etc. matcher-cli enables headless support for all of these tasks, and can easily integrate with your choice of CI to automate any of the above tasks right inside your CI.

A Leaflet extension to distort images -- "rubbersheeting" -- for the MapKnitter.org (src) image georectification service by Public Lab. Leaflet.DistortableImage allows for perspectival distortions of images on the client-side.

Project Demonstrations

Watch the matcher-core in action by mapping two 4K images this demo.

Run the following command inside your terminal for an interactive demo.

$ bash <(curl -s https://gist.githubusercontent.com/rexagod/6e1a2cfdc18e1b12ff8d64b5d4e6985a/raw/e5cf33c9bb2427f25d8394d0e007cabc40a8a5da/cli-demo.sh)

Checkout the stitcher and projector helper modules for matcher-core in action here by enabling matcher.js from the bottom-left. The current progress is demonstrated here which I got the opportunity to contribute to for some time as well.

Project Involvement

Being welcoming in nature, the README.mds below have been catered from a contributor's perspective, and include almost every resource a contributor would require in order to get started with these.

FTOs can be found below.

Project Leftovers and Future Plans

  • matcher-core
    • Implementing streams for data flow between sockets. This would immensely reduce noise, and speed up the load time. The idea's pretty simple, send the utils promise directly to the socket in the form of a stream and resolve it there and then.
    • Rebasing rexa-soc-ldi after we shift to ES6.
    • Containerized build through Docker on the CI.
    • More (unique) headless automated tasks (other than tests, for eg., crossposting back to the PR on each build, etc.) on the CI.
    • Rebasing matcher-module once we modify image-sequencer for asychronous modules (as proposed to @jywarren).
  • matcher-cli
    • Vorpal was incorporated for a better understanding of the codebase, but takes a bit to load. Implementing Vorpal's APIs purely in Node would definitely bring up the loading time, but it would be a tradeoff for code abstractions.
    • Generalize standard methods and expose APIs to gain flexibility.
  • Leaflet.DistortableIamge
    • PWA conversion! Perhaps take a step further and integrate electron as well.
    • In-browser drag and drop functionality.
    • Headless tests on CI.

Project Overall Contribution

Project Experience

The Public Lab community has supported me througout the duration, and even before this Summer of Code began, and granted me such a great opportunity to work among such brilliant and supportive people, for which I'll always be obliged to them. I've undoubtedly learnt numerous stupendous concepts throughout my time here, and perfected my passion for JavaScript through the guidance of my mentors, who were always there to support me, motivate me, and help me push my limits, for which I'll always be thankful.

Thank you, Public Lab, for such a fascinating experience, I'd love to continue being a part of and keep on contributing to this amazing community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment