Coder Social home page Coder Social logo

helenxr / distortionizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from osvr/distortionizer

0.0 2.0 0.0 3.37 MB

Tool for determining distortion parameters of arbitrary HMDs, and a corresponding set of shaders to correct that distortion.

License: Apache License 2.0

CMake 64.63% C++ 16.72% C 1.31% QMake 0.07% Shell 0.13% HTML 15.75% GLSL 0.30% Python 1.11%

distortionizer's Introduction

Distortionizer

Maintained at https://github.com/OSVR/distortionizer

For details, see http://osvr.github.io

For support, see http://support.osvr.com

Distortionizer tool that allows estimating the optical and chromatic distortion of HMDs and a shader that uses the measured parameters to correct such distortion.

Instructions on how to get it to build and run in VS

  1. Download and install latest version of Qt (with openGL)
  2. Download and unpack latest version of GLEW
  3. Open CMake and navigate to distortionizer directory
  4. Add path for build directory like /distortionizer/bin
  5. Click "Add Entry", add CMAKE_PREFIX_PATH of type STRING with the value containing the location of Qt OpenGL directory and Glew directory like C:/Qt/Qt5.4.0-gl/5.4/msvc2013_opengl;C:/glew
  6. Click "Configure", and choose the right generator (probably Visual Studio 12 2013).
  7. If there is an error, the "Generate" button will not be available. Just having red entries doesn't mean it failed - you'd see an error message down below. If it did fail, you'll need to fill in more entries, depending on what it failed to find. For example:
  • For Qt5Widgets_DIR specify like (adjust for your path) C:/Qt/Qt5.4.0-gl/5.4/msvc2013_opengl/lib/cmake/Qt5Widgets
  • For Qt5OpenGL_DIR specify like (adjust for your path) C:/Qt/Qt5.4.0-gl/5.4/msvc2013_opengl/lib/cmake/Qt5OpenGL
  • For GLEW_DLL specify like (adjusting for your path) C:/glew/bin/Release/Win32/glew32.dll
  1. Once you've gotten it to successfully configure, click "Generate" to make the VS solution in the build directory.
  2. After you open solution, right click on distortionizer-calibration in VS in Solution Explorer widget and select "Set as Startup Project"
  3. In menu header, click on Project -> Properties (or Alt+F7) and in "Configuration Properties" -> Debugging set "Environment" to something like PATH=$(PATH);C:\Qt\Qt5.4.0-gl\5.4\msvc2013_opengl\bin otherwise it will complain about missing Qt5OpenGL.dll file

Instructions on how to use Distortionizer

Distortion estimation for HMD using K1 (quadratic) term

The program always runs on the last screen, full screen

Click with the mouse in the left eye to locate center

Keyboard controls:

  • r/R: Increase/Decrease distortion in R+G+B
  • g/G: Increase/Decrease distortion in G+B
  • b/B: Increase/Decrease distortion in B only
  • S/L: Save/Load state from JSON config file (HMD_Config.json by default)
  • Left,Right,Up,Down: Move the center of projection by one pixel
  • f/F: Toggle fullscreen on/off
  • c/C: Reset center of projection
  • v/V: Reset distortion values to 0
  • ESC/Q: Quit the application

To judge the results, pull the HMD out of DirectMode so that it shows up as a second display. Put it into Landscape mode. Move the distortion window onto the HMD's display and then use F to toggle fullscreen on. Look through the HMD and adjust the values to make red, green and blue line up and to make all of the lines straight. This is an optimization in a high-dimensional space, so be prepared for some frustration.

License

This project: Licensed under the Apache License, Version 2.0.

angles_to_config

This is a stand-alone program that provides a more principled approach to distortion correction than the "adjust until it looks right" method described above.

It reads in the results of measurements of display positions with respect to angles from the eye position when looking through the display and produces either one mesh (for mono) or three (for RGB) distortion maps.

distortionizer's People

Contributors

russell-taylor avatar rpavlik avatar gfrolov avatar mars979 avatar olsoneric avatar

Watchers

James Cloos avatar Helen_XR 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.