etiennedub / pyk4a

Python 3 wrapper for Azure-Kinect-Sensor-SDK
MIT License
290 stars 81 forks source link

quality of color point cloud #187

Open MichalZuraw opened 1 year ago

MichalZuraw commented 1 year ago

Hello Do you know why quality of point cloud from azure kinect sdk tool is better than from python. i using ` capture._color = cv2.cvtColor(cv2.imdecode(capture.color, cv2.IMREAD_COLOR), cv2.COLOR_BGR2BGRA) capture._color_format = pyk4a.ImageFormat.COLOR_BGRA32

    filename = '{date:%Y-%m-%d-%H-%M-%S}.ply'.format(date=datetime.datetime.now())

    transformed = pyk4a.color_image_to_depth_camera(capture.color, capture.depth, playback.calibration, playback.thread_safe)[:,:,:3]

    points=capture.depth_point_cloud.reshape((-1, 3))

    colors = cv2.cvtColor(transformed,cv2.COLOR_RGB2BGR).reshape((-1, 3))

    name=os.path.join(directory,filename)

    save_colorpointcloud(name,points,colors)

`

rajkundu commented 1 year ago

The quality of the color point cloud is going to depend on the quality of the color image, because the color point cloud is created by transforming the raw depth data into the color camera's perspective. What configuration are you using for your capture? What resolution is your color camera set to?