Coder Social home page Coder Social logo

kevguy / cardboard Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 0.0 19.41 MB

An app for viewing 3D images, videos and panorama images using Google Cardboard.

Home Page: http://kevlaichungsing.blogspot.com/2016/07/google-cardboard.html

MATLAB 32.74% Java 67.26%

cardboard's Introduction

Cardboard

  • Android app for viewing 3D images, videos and panorama images using Google Cardboard
  • Originally it was a project for my Computational Photography class, so it was all native Java code instead of using Unity
  • Matlab code was written for generating stereoscope images and videos using DIBR Algorithm
  • A simple PhotoSphere was implemented using gyroscope sensors for viewing panorama images
  • Implementation details can be found here: http://kevlaichungsing.blogspot.hk/2016/07/google-cardboard.html

Image Cardboard

The default images are stored in a folder called CardBoardDemo in the home directory. And the image names are imgLeft.bmp and imgRight.bmp. In the app menu, you can choose your own images and when entering viewing mode, you can switch the default images and your chosen pictures by triggering the magent.

Video Cardboard

The default videos are stored in a folder called CardBoardDemo in the home directory. And the video names are vidLeft.mp4 and vidRight.mp4. In the menu, you can choose your own videos and when entering the viewing mode, you can play and pause the video by triggering the magnet.

Panaorma Cardboard

The default image is stored in a folder called CardBoardDemo in the home directory . And the image aame is pana.jpg. In the menu, you can choose your own image and when enrering the viewing mode you can zoom in and out by triggering the magnet.

Also, in order to minimize the interference of the magnet (of the CardBoard), gyroscope sensor is used to determine the orientation instead of using accelerometer and magentet sensor in the given code.

In the code folder:

  • findVideoInfo.m - to find the information of a video
  • generateSubPic.m - generate a black image with a given line of text, resolution is the same as the video, I call it a subtitle image
  • logoDepthMap.m - generate depth map for the CUHK logo
  • makeVideoWithLogo.m - paste the CUHK logo (left and right) on the video (left and right)
  • makeVideoWithSub.m - blend the subtitle image (left and right) into the video (left and right)
  • subDepthMap.m - generate depth map for a subtitle image
  • withDepthMap.m - generate images (left and right) using a given depth map
  • withDisparityMap.m - generate images (left and right) using a given disparity map

In the CardboardFolder:

You can just copy this whole folder into the sdcard directory of your device.

  • CUHK/left.bmp - original image, which is used as the left image
  • CUHK/right.bmp - image generated using withDepthMap.m, which is used as the right image
  • OrgVideo/left.mp4 - the original given video
  • OrgVideo/right/mp4 - the original given video
  • Pana/pan2.jpg - another panaroma image to choose
  • Sample/left.bmp - the sample image given
  • Sample/left.jpg - the sample image given
  • Sample/right.bmp - the sample image given
  • Sample/right.jpg - the sample image given
  • Test1/left.bmp - an given image
  • Test1/right.bmp - image generated using with DepthMap.m, which is used as the right image
  • Test2/left.bmp - an given image
  • Test2/right.bmp - image generated using with DepthMap.m, which is used as the right image
  • VideoTest/OnlyLogo/left.mp4 - video generated using makeVideoWithLogo.m, with CUHK logo on it
  • VideoTest/OnlyLogo/right.mp4 - video generated using makeVideoWithLogo.m, with a processed CUHK logo (i.e. CUHK/right.bmp) on it
  • imgLeft.bmp - default left image for Image Cardboard
  • imgRight.bmp - default right image for Image Cardboard
  • panLeft.jpg - default left image for Panaroma Cardboard
  • panRight.jpg - default right image for Panaroma Cardboard
  • vidLeft.mp4 - default left video for Video Cardboard
  • vidRight.mp4 - default left video for Video Cardboard

Note: On Android 6.0, you have to manually enable the permission for Location and Storage after installation in order for the app to work.

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.