GithubHelp home page GithubHelp logo

zzhall / stitchcam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mitcomputationalcamera/stitchcam

0.0 1.0 0.0 456 KB

HW5: Uses OpenCV to find where one image may be aligned in another image (and shows what that border/warp looks like)

Java 100.00%

stitchcam's Introduction

StitchCam (HW5)

Uses OpenCV to find where one image may be aligned in another image (and shows what that border/warp looks like)

You will create an app that, upon taking two overlapping images, figures out where the first image overlaps the second using Features2D/Homographies. This technique is used, in part, by panorama apps to identify features between two overlapping images that are the same, allowing the device to combine and stitch together the image intelligently.

Please use this link for reference! http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html#feature-homography

As always, you will be adding code into a ready-made skeleton above. This involves OpenCV so keep in mind you will need to make sure all your settings are correct and that the libary has benen added correctly (Right Click Project>Properties>Android>Add the OpenCV Library Properly)

Desired Output

When you've completed the app, you will run it, take 2 pictures (with overlapping images and common features), and examine the output in your phone's DCIM folder. Again, you should be using a file explorer to do this so you can see the files as soon as they are created and also see the filenames.

Once the images have saved (the take picture button should re-enable after the 2nd time you press it), you should get 4 output images similar to the ones below:

  1. First Image you took ("ImageOne_Original"): Link
  2. First and Second Image you took with Feature Matching algorithm ("Feature_match"): Link
  3. First Image Warped as if it were to be matched up on the second image ("Warped"): Link
  4. Second Image containing the Warped First Image's red outline ("ImageTwo_with_WarpedImageOne"): Link

Operating the App

  1. Open the App, turn the phone sideways (landscape works better for some reason)
  2. Click Take Picture
  3. Move the camera to an other part of the scene where the 2 images overlap in both frame and contain similar features
  4. Click Take Picture again
  5. (wait)
  6. Rejoice! The photos should now be saved in your DCIM folder

Troubleshooting (known problems)

  • App crashing after taking second image - If the difference between your first image and second image is too extreme, the features are too blurry/dark, or you've shaken the camera too much, the homography will fail and will not compute correctly (this is a simple version of homographies/stitching). Try make smaller changes and changing your scene to something well lit and wiht hard edges.
  • App is full of errors at start - Make sure you've imported your OpenCV Library properly! Right Click Project>Properties>Android>Add the OpenCV Library at the bottom right and remove the faulty one)
  • The read outline is just a dot/tiny line - This means the matching algorithm likely failed. Try a brighter scene with more distinct features (sharp edges/bold corners)

Submission

MIT/Skolkovo Students - Please submit your 4 image file output for a scene of your choosing (do something interesting!) and your compiled .apk file. Online Students - Please submit your image files on the online Facebook Page.

stitchcam's People

Contributors

purirohan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.