Git Product home page Git Product logo

peterzhousz / light-structure-from-pin-motion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hiroaki-santo/light-structure-from-pin-motion

0.0 1.0 0.0 18 KB

This is the project page for our ECCV 2018 paper 'Light Structure from Pin Motion: Simple and Accurate Point Light Calibration for Physics-based Modeling' by Hiroaki Santo, Michael Waechter, Masaki Samejima, Yusuke Sugano, and Yasuyuki Matsushita.

Python 100.00%

light-structure-from-pin-motion's Introduction

Light Structure from Pin Motion

This is the project page for our ECCV 2018 paper 'Light Structure from Pin Motion: Simple and Accurate Point Light Calibration for Physics-based Modeling' by Hiroaki Santo, Michael Waechter, Masaki Samejima, Yusuke Sugano, and Yasuyuki Matsushita. You can find links to our paper, supplemental material, and Youtube video.

If you use our paper or code for research purposes, please cite our paper:

@inproceedings{Santo_2018_ECCV,
	title = {Light Structure from Pin Motion: Simple and Accurate Point Light Calibration for Physics-based Modeling},
	author = {Hiroaki Santo and Michael Waechter and Masaki Samejima and Yusuke Sugano and Yasuyuki Matsushita},
	booktitle = {European Conference on Computer Vision (ECCV)},
	year = {2018},
}

How to Run

You can get help on how to run the code:

$ python calibration.py --help

Simulation

One example call for generating a synthetic dataset and solving it would be

$ python calibration.py --sim_type near --pin_num 5 --sim_pose_num 10 --sim_noise_shadow 0.01 --sim_board_distance 500

The program outputs the ground truth as well as the estimated result for the light position/direction and the pin head positions.

Real-world data

Data Preparation

You need to prepare following files:

  • Images (*.png)
  • board_size.txt (Information of 2D marker. Two lines text file: Length of a marker and separation.)
  • params_*.npz (Result of camera calibration. Keywords with intrinsic and dist (distortion) should be provided.)

Please put all of them into one directory (DATA_PATH).

(Camera Calibration)

We provide calibration_camera_aruco.py for camera calibration with ArUco markers. You can use images of our calibration target, but we recommend to use the calibration target with full markers for the camera.

$ python calibration_camera_aruco.py -i IMAGES_DIR

Pre-processing

Detecting 2D markers and shadows by using following two codes. Output files are stored to DATA_PATH.

$ python detect_markers.py -i DATA_PATH
$ python detect_shadows.py -i DATA_PATH

Our shadow detection method uses a simple template-matching technique. The program outputs the images to ./DATA_PATH/tmp which illustrate the detected shadow points.

Estimation

$ python calibration.py -i DATA_PATH

The program outputs the estimated light source position/direction and the pin head positions.

The file methods.py contains the functions that estimate the light source and pin head positions from projected_points (the shadow positions), Rs (the various rotations of the calibration board), and tvecs (translations of the calibration board).

light-structure-from-pin-motion's People

Contributors

hiroaki-santo avatar

Watchers

 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.