Git Product home page Git Product logo

img2ply's Introduction

img2ply

Convert an image sequence to a PLY point cloud.

alt text

Installation

Using pip:

pip install img2ply

If you prefer to install from source code use:

cd img2ply/
python setup.py install

Usage

From the command line:

img2ply -h

img2ply [-h] -o PLY -bb BOUNDINGBOX BOUNDINGBOX BOUNDINGBOX
  [--depthDirection DEPTHDIRECTION] [--depthInverse DEPTHINVERSE]
  [--ignoreAlpha IGNOREALPHA] [--widthSamples WIDTHSAMPLES]
  [--heightSamples HEIGHTSAMPLES]
  [--maintainAspectRatio MAINTAINASPECTRATIO]
  input

input:                  path to image sequence
-o:                     output file path
-bb:                    bounding box of object in x, y, z
--depthDirection:       direction in which the slices are facing
--depthInverse:         reverse the placement of the slices
--ignoreAlpha:          ignore pixels with an alpha value below 25
--widthSamples:         amount of width samples, if 0 every pixel is sampled
--heightSamples:        amount of height samples, if 0 every pixel is sampled
--maintainAspectRatio:  maintain aspect ratio of sample points

The package can also be used as a library:

import img2ply
img2ply.convert(
    input, 
    ply, 
    bb,
    direction="z", 
    inverse=False,
    ignoreAlpha=True,
    wSamples=0, 
    hSamples=0, 
    maintainAspectRatio=True
)

Test

Test conversion can be done by running the following code, it will loop over all of the images in the images directory and create a pumpkin.ply file.

cd img2ply/tests
python convert.py

alt text

img2ply's People

Contributors

robertjoosten avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

img2ply's Issues

Not a issue just a question

So, when are you going to update the script to python 3. cause it's really a hassle to run this script in the outdated python 2.7.

error

Traceback (most recent call last):
  File "convert.py", line 2, in <module>
    import img2ply
  File "/usr/local/lib/python3.5/dist-packages/img2ply.py", line 260
    print divider()
                ^

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.