Classes | |
class | AppState |
Functions | |
def | axes (out, pos, rotation=np.eye(3), size=0.075, thickness=2) |
def | frustum (out, intrinsics, color=(0x40, 0x40, 0x40)) |
def | grid (out, pos, rotation=np.eye(3), size=1, n=10, color=(0x80, 0x80, 0x80)) |
def | line3d (out, pt1, pt2, color=(0x80, 0x80, 0x80), thickness=1) |
def | mouse_cb (event, x, y, flags, param) |
def | pointcloud (out, verts, texcoords, color, painter=True) |
def | project (v) |
def | view (v) |
Variables | |
color_frame = frames.get_color_frame() | |
color_image = np.asanyarray(color_frame.get_data()) | |
color_source | |
colorizer = rs.colorizer() | |
config = rs.config() | |
decimate = rs.decimation_filter() | |
depth_colormap | |
depth_frame = frames.get_depth_frame() | |
depth_image = np.asanyarray(depth_frame.get_data()) | |
depth_intrinsics = depth_profile.get_intrinsics() | |
depth_profile = rs.video_stream_profile(profile.get_stream(rs.stream.depth)) | |
dt = time.time()-now | |
frames = pipeline.wait_for_frames() | |
h | |
key = cv2.waitKey(1) | |
mapped_frame | |
n | |
now = time.time() | |
out = np.empty((h, w, 3), dtype=np.uint8) | |
pc = rs.pointcloud() | |
pipeline = rs.pipeline() | |
points = pc.calculate(depth_frame) | |
profile = pipeline.get_active_profile() | |
rotation | |
size | |
state = AppState() | |
t | |
texcoords = np.asanyarray(t).view(np.float32).reshape(-1, 2) | |
thickness | |
tmp = np.zeros((h, w, 3), dtype=np.uint8) | |
v | |
verts = np.asanyarray(v).view(np.float32).reshape(-1, 3) | |
w | |
def opencv_pointcloud_viewer.axes | ( | out, | |
pos, | |||
rotation = np.eye(3) , |
|||
size = 0.075 , |
|||
thickness = 2 |
|||
) |
draw 3d axes
Definition at line 190 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.frustum | ( | out, | |
intrinsics, | |||
color = (0x40, 0x40, 0x40) |
|||
) |
draw camera's frustum
Definition at line 200 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.grid | ( | out, | |
pos, | |||
rotation = np.eye(3) , |
|||
size = 1 , |
|||
n = 10 , |
|||
color = (0x80, 0x80, 0x80) |
|||
) |
draw a grid on xz plane
Definition at line 175 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.line3d | ( | out, | |
pt1, | |||
pt2, | |||
color = (0x80, 0x80, 0x80) , |
|||
thickness = 1 |
|||
) |
draw a 3d line from pt1 to pt2
Definition at line 161 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.mouse_cb | ( | event, | |
x, | |||
y, | |||
flags, | |||
param | |||
) |
Definition at line 89 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.pointcloud | ( | out, | |
verts, | |||
texcoords, | |||
color, | |||
painter = True |
|||
) |
draw point cloud with optional painter's algorithm
Definition at line 222 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.project | ( | v | ) |
project 3d vector array to 2d
Definition at line 140 of file opencv_pointcloud_viewer.py.
def opencv_pointcloud_viewer.view | ( | v | ) |
apply view transformation on vector array
Definition at line 156 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.color_frame = frames.get_color_frame() |
Definition at line 273 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.color_image = np.asanyarray(color_frame.get_data()) |
Definition at line 283 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.color_source |
Definition at line 289 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.colorizer = rs.colorizer() |
Definition at line 86 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.config = rs.config() |
Definition at line 68 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.decimate = rs.decimation_filter() |
Definition at line 84 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.depth_colormap |
Definition at line 285 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.depth_frame = frames.get_depth_frame() |
Definition at line 272 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.depth_image = np.asanyarray(depth_frame.get_data()) |
Definition at line 282 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.depth_intrinsics = depth_profile.get_intrinsics() |
Definition at line 79 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.depth_profile = rs.video_stream_profile(profile.get_stream(rs.stream.depth)) |
Definition at line 78 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.dt = time.time()-now |
Definition at line 322 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.frames = pipeline.wait_for_frames() |
Definition at line 270 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.h |
Definition at line 80 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.key = cv2.waitKey(1) |
Definition at line 329 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.mapped_frame |
Definition at line 289 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.n |
Definition at line 306 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.now = time.time() |
Definition at line 302 of file opencv_pointcloud_viewer.py.
Definition at line 264 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.pc = rs.pointcloud() |
Definition at line 83 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.pipeline = rs.pipeline() |
Definition at line 67 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.points = pc.calculate(depth_frame) |
Definition at line 293 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.profile = pipeline.get_active_profile() |
Definition at line 77 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.rotation |
Definition at line 308 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.size |
Definition at line 306 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.state = AppState() |
Definition at line 64 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.t |
Definition at line 297 of file opencv_pointcloud_viewer.py.
Definition at line 299 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.thickness |
Definition at line 308 of file opencv_pointcloud_viewer.py.
Definition at line 313 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.v |
Definition at line 297 of file opencv_pointcloud_viewer.py.
Definition at line 298 of file opencv_pointcloud_viewer.py.
opencv_pointcloud_viewer.w |
Definition at line 80 of file opencv_pointcloud_viewer.py.