Coder Social home page Coder Social logo

PPM/PGM file support about open3d HOT 4 CLOSED

isl-org avatar isl-org commented on May 6, 2024
PPM/PGM file support

from open3d.

Comments (4)

syncle avatar syncle commented on May 6, 2024

Looks like libjpeg supports ppm (see line 142 External/libjpeg/jconfig.h)

from open3d.

qianyizh avatar qianyizh commented on May 6, 2024

Very good. Yes, we need to support these file formats. However, we have two viable solutions.

  1. If ppm is natively supported by libjpeg, then the solution is simple, just copy FileJPG.h/cpp to FilePPM.h/cpp and edit the interface.

  2. If option 1 is too complicated, we don't need to introduce new libraries for parsing image. py3d supports creating an Image from a numpy array. E.g.

	print("Convet a numpy image to Image and show it with DrawGeomtries().")
	y = mpimg.imread("../TestData/lena_color.jpg")
	print(y.shape)
	yy = Image(y)
	print(yy)
	DrawGeometries([yy])

So for the NYU data, we don't even need to write a parser for ppm. Just in our python tutorial, we read the image using this method. This is actually the benefit of using Python. Open3D need not to support everything. We just write 3D algorithms in C++, and Python can take care of the auxiliary functionalities.

from open3d.

syncle avatar syncle commented on May 6, 2024

I agree. I also thought the same thing, and I was working on option 2. Actually it turns out that even mathploblib.image is not friendly toward NYU pgm depth format, and I had to write a python function for this. You will check this issue from new commit.

from open3d.

qianyizh avatar qianyizh commented on May 6, 2024

Addressed in #42

from open3d.

Related Issues (20)

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.