Giter Site home page Giter Site logo

cardboard_seethrough's Introduction

Cardboard See-Through

Author: Long Qian

Date: 2016-10-14

Overview

The purpose of this repository is to turn Google Cardboard into an Video See-Through (VST) Augmented Reality device. However, there is usually only one camera for iOS and Android devices. The stereo vision is simulated by applying a fixed disparity to the left half and right half of the screen. iPhone 7 plus does have two cameras, but unfortuantely, they are not aligned vertically. The detailed post can be found on this blog page.

Requirement

Building

  • Unity3D (v5.0+)
  • Android SDK

Running

  • Android Phone (API 19+)
  • Google Cardboard v1: Cardboard v2 is great, but it does not support camera capture.

Implementation

Fragment shader (pixel shader) of Unity3D does almost everything here, including:

  • Apply correct pixel density adjustment to display image with correct scale
  • Barrel distortion is done, so that the image is good for Cardboard lenses.
  • Put disparity to the two halves of the display, so that a FAKE stereo vision is created.

The FOV and disparity level can be adjust through sliders on screen. Frame rate is displayed as well.

The pixel moving job is the last step of rendering. Augmented Reality application can run over this implementation, before the final texture is blited to the screen.

Demonstration

  • The slider on the top right corner controls the field of view, which is correspondent to the size of visible area on the screen
  • The slider on the button right corner controls the percentage of the difference in the image
    • 0.0 for exactly same display
    • 0.1 for 10% difference (0.3 maximum).

capture

capture

Conclusion

  • Shader is your best friend.
  • I am looking forward to stereo vision cameras on Android platforms.

cardboard_seethrough's People

Contributors

qian256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cardboard_seethrough's Issues

Black screen on Android

I tried to run this on my android. I used Unity 2018.3.5f1.
The screen appears to be black. Could you please suggest a fix?

No license

Could you add MIT license to this project?

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.