Skip to content
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

Demo program to save point cloud and rectified image data. #385

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marco-paladini
Copy link

Moving the luxonis/depthai-python#655 pull request to the experiments repo.

This PR provides users with a debugging program that computes a point cloud and writes all debugging data to disk.
Also added a minimal pcd viewer and a README for the demo program.

@Luxonis-Brandon
Copy link
Contributor

Thank you!

@marco-paladini
Copy link
Author

This demo program was based off rgb_depth_aligned but now I noticed the rgbd-pointcloud program in this repo does mostly everything that is done in save_point_cloud except for saving the data to disk, so potentially this PR should be closed and the save code added to rgbd-pointcloud?

frameDepth = None

if cv2.waitKey(1) == ord("q"):
# save all images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could save images when pressing s as save instead?

Comment on lines +146 to +153
queueEvents = device.getQueueEvents(
("rgb", "depth", "rectifiedLeft", "rectifiedRight")
)
for queueName in queueEvents:
packets = device.getOutputQueue(queueName).tryGetAll()
if len(packets) > 0:
latestPacket[queueName] = packets[-1]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic of getting frames isn't ideal. Maybe jut use get() instead, or maybe add syncing logic to it (based on sequence number)?

stereo.rectifiedRight.link(xoutRectifRight.input)

# Connect to device and start pipeline
with device:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you are using context manager, move with dai.Device(pipeline) as device here (like in all other demos)

@Erol444
Copy link
Member

Erol444 commented Sep 13, 2022

@marco-paladini yes I agree I would just expand the existing demo to add saving option when pressing eg. s key. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants