-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic tutorial #113
Basic tutorial #113
Conversation
source activate py35 | ||
cmake -DPYTHON_EXECUTABLE:FILEPATH=<path-to-anaconda>/envs/py35/bin/python3.5 ../src | ||
|
||
This example uses Python 3.5, but you can choose 2.7 or other. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use a new conda environment?
I don't think we need it.
Some users may have installed conda3 already, so there is no point in adding a new environment.
Also, I think the latest python in conda is 3.6.
Python binding | ||
================= | ||
|
||
We highly recommend this option as it gives easy interface to users. Open3D tutorial is written for Python binding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line. It should not be placed here.
Tutorial | ||
####################### | ||
|
||
This is a quick Python tutorial to be familiar with the library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open3D has two interfaces: C++, and Python. This tutorial focuses on the Python interface since it is easy to use and should be regarded as the primary interface of Open3D.
--Note--
For C++ interfaces, refer to examples in [Test] and [Tools] folder.
@@ -0,0 +1,109 @@ | |||
.. _tutorial: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be separate files. Each tutorial file has its own document page.
------------------------------------- | ||
Let's get started Open3D by importing Python module. | ||
Once you successfully compiled Open3D with Python binding option, | ||
py3d.so should be visible under Open3D build folder. Let's import it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
py3d.so (or py3d.pyd if you are using Windows) should be compiled under the build/lib folder. All [Python/Tutorials] files will be also copied to [build/lib]. You can call them in place and see results. Listed below:
- Basic
- basic1
- basic2
....
draw_geometries([pcd]) | ||
|
||
Note that ``draw_geometries`` can visualize multiple geometries by taking a list of objects. | ||
We will see more examples of this function later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to:
The code is straightforward. First import the Open3D library (named py3d). Then call function read_point_cloud
to read a point cloud from a file. This function detects the extension name of the file and tries its best to decode the file into a point cloud. Current supported extension names include: pcd, ply, xyz, xyzrgb, xyzn, pts.
The data structure of the point cloud is:
Pointcloud
-- points: (numpy array with xxxx)
-- colors: (xxxx, can be empty)
-- normals: (xxxx, xxxxx)
More tutorials will show how to manipulate these data records. In this tutorial we just focus on the rendering task. Thus, we finally call draw_geometries functions...
This functions does....
Show a figure.
Explain the GUI a bit. There are actually lots of stuff to explain, e.g., you can press +- to change the point size, etc.
draw_geometries([mesh]) | ||
|
||
Here, method ``compute_vertex_normals`` computes point normal of meshed surface. | ||
``draw_geometries`` will draw shaded geometry based on the computed normal direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate file.
there are also some special things for meshes to explain.
e.g. b to enable back face rendering. There are different render mode (phong, etc).
|
||
vol = read_selection_polygon_volume("../TestData/Crop/cropped.json") | ||
chair = vol.crop_point_cloud(pcd) | ||
draw_geometries([chair]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
Read RGBD Image | ||
------------------------------------- | ||
Open3D provides a variety of 3D reconstruction algorithms using depth cameras. | ||
A pair of color and depth image is a input for the reconstruction pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate file and detailed explanation.
@@ -0,0 +1,71 @@ | |||
# Open3D: www.open3d.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am actually not a big fan of my code in test_py3d file.
They look very messy and ugly. Not tutorial quality code.
If you want to explain the internal structure of an image, you can do it in read_rgbd_image tutorial. Maybe add a few Jupyter notebook cells to show how they are accessed via numpy array.
But definitely not something like this. I can't even read it.
Moving 'test' examples to basic tutorial examples.
Working on tutorial documents.
Please merge #112 first.