真是累啊,好不容易终于找到了points对象的文档了。。。
隐藏得太深!!
通过dir()搜索对象方法,点击方法才找到的
points = color_frame.as_points()
# print(type(a)) # <class 'pyrealsense2.pyrealsense2.points'>
# print(dir(a))
# ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__nonzero__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'as_depth_frame', 'as_frame', 'as_frameset', 'as_motion_frame', 'as_points', 'as_pose_frame', 'as_video_frame', 'data', 'export_to_ply', 'frame_number', 'frame_timestamp_domain', 'get_data', 'get_data_size', 'get_frame_metadata', 'get_frame_number', 'get_frame_timestamp_domain', 'get_profile', 'get_texture_coordinates', 'get_timestamp', 'get_vertices', 'is_depth_frame', 'is_frame', 'is_frameset', 'is_motion_frame', 'is_points', 'is_pose_frame', 'is_video_frame', 'keep', 'profile', 'size', 'supports_frame_metadata', 'swap', 'timestamp']
points.export_to_ply()
from pyrealsense2.points.py
# encoding: utf-8
# module pyrealsense2.pyrealsense2
# from D:\20191031_tensorflow_yolov3\python\lib\site-packages\pyrealsense2\pyrealsense2.cp36-win_amd64.pyd
# by generator 1.147
"""
LibrealsenseTM Python Bindings
==============================
Library for accessing Intel RealSenseTM cameras
"""
# imports
import pybind11_builtins as __pybind11_builtins
from .frame import frame
class points(frame):
""" Extends the frame class with additional point cloud related attributes and functions. """
def export_to_ply(self, arg0, arg1): # real signature unknown; restored from __doc__
"""
export_to_ply(self: pyrealsense2.pyrealsense2.points, arg0: str, arg1: pyrealsense2.pyrealsense2.video_frame) -> None
Export the point cloud to a PLY file
"""
pass
def get_texture_coordinates(self, dims=1): # real signature unknown; restored from __doc__
"""
get_texture_coordinates(self: pyrealsense2.pyrealsense2.points, dims: int=1) -> pyrealsense2.pyrealsense2.BufData
Retrieve the texture coordinates (uv map) for the point cloud
"""
pass
def get_vertices(self, dims=1): # real signature unknown; restored from __doc__
"""
get_vertices(self: pyrealsense2.pyrealsense2.points, dims: int=1) -> pyrealsense2.pyrealsense2.BufData
Retrieve the vertices of the point cloud
"""
pass
def size(self): # real signature unknown; restored from __doc__
""" size(self: pyrealsense2.pyrealsense2.points) -> int """
return 0
def __init__(self, *args, **kwargs): # real signature unknown; restored from __doc__
"""
__init__(*args, **kwargs)
Overloaded function.
1. __init__(self: pyrealsense2.pyrealsense2.points) -> None
2. __init__(self: pyrealsense2.pyrealsense2.points, arg0: pyrealsense2.pyrealsense2.frame) -> None
"""
pass