isl-org / isl-org/Open3D

View setting of setup_camera function in O3DVisualizer class

Open
#7,033 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### My Question

The value of filed_of_view in the _camera function does not change the final render image? I set one to 60 degrees and the other to 10 degrees, but the picture is the same.
This is photo with value in 10 degrees.
![photo1](https://github.com/user-attachments/assets/631759af-cdb0-4d5b-9c30-0c4c83703e63)
This is photo with value in 60 degrees.
![photo2](https://github.com/user-attachments/assets/ea0c2788-a9bd-421d-ba67-40d19d37c969)
the code is :
import open3d as o3d
import numpy as np
o3d.visualization.gui.Application.instance.initialize()
pcd = o3d.io.read_point_cloud("D:/MPEG/mpeg-pcc-tmc2/mpeg_datasets/longdress/Ply/longdress_vox10_1051.ply")
box = pcd.get_axis_aligned_bounding_box()
min_box = box.get_min_bound()
max_box = box.get_max_bound()
center = (max_box + min_box) / 2
eye = np.array(center) + np.array([0, 0, 700])
vis = o3d.visualization.O3DVisualizer("3DVis", width=1920, height=1080)
vis.add_geometry(name="point_cloud", geometry=pcd, is_visible=True)
vis.point_size = 2
bg_color = np.array([255.0, 255.0, 255.0, 1.0], dtype=np.float32).reshape(4, 1)
vis.set_background(bg_color, None)
vis.post_redraw()
vis.enable_raw_mode(enable=True)
vis.show_skybox(show=False)
field_of_view = 60.0
center = np.array(center, dtype=np.float32)
eye = np.array(eye, dtype=np.float32)
up = np.array([0.0, 1.0, 0.0], dtype=np.float32)
vis.setup_camera(field_of_view, center, eye, up)
vis.post_redraw()
o3d.visualization.gui.Application.instance.add_window(vis)
path = r"D:\photo\photo2.png"
vis.export_current_image(path)
o3d.visualization.gui.Application.instance.run()

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.