-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
save_to_ply / export_to ply not giving always the same output #9534
Comments
Hi @pelluchon As a first step, I would recommend adding the term repeat_playback=false to the brackets of the cfg.enable_device_from_file instruction. This will prevent the bag file from looping around to the start when it reaches the final frame during playback. The cfg.enable_device_from_file line of your script would therefore look like this after the addition: cfg.enable_device_from_file(input_rs, repeat_playback=false) |
Hi @MartyG-RealSense, Thank you for the quick answer. I did try and it slighly better. If before, I had one different over 3, now it is more one over 5. That with save_to_ply, with export_to_ply it does not change the issue. Any other ways ? Many Thanks |
Is there any further improvement if you add two lines below your pipe start instruction to configure set_real_time for playback as false.
|
yes, it has solved the issue. Many Thanks |
You are very welcome - that's great news. Thanks for the update! |
Case closed due to solution achieved and no further comments received. |
Hi,
I am saving an output of a bag video into ply using the code below. If i am running several times the script, I do not have the same export every time.
`pipe = rs.pipeline()
cfg = rs.config()
cfg.enable_device_from_file(input_rs)
profile = pipe.start(cfg)
pc = rs.pointcloud()
colorizer = rs.colorizer()
while True:
frameset = pipe.wait_for_frames()
align = rs.align(rs.stream.color)
frameset = align.process(frameset)
colorized = colorizer.process(frameset)
color_frame = frameset.get_color_frame()
depth_frame = frameset.get_depth_frame()
pc.map_to(color_frame)
ply = rs.save_to_ply(inter_output)
ply.set_option(rs.save_to_ply.option_ply_binary, False)
ply.set_option(rs.save_to_ply.option_ply_normals, False)
ply.set_option(rs.save_to_ply.option_ignore_color, False)
ply.set_option(rs.save_to_ply.option_ply_threshold, True)
ply.process(frameset)`
I have tried with save_to_ply and export_to ply using the code below for export_to_ply.
points = pc.calculate(aligned_depth_frame) points.export_to_ply(inter_output, color_frame)
Does anyone had the same issue and if so how to solve it ?
Many thanks
|---------------------------------|------------------------------------------- |
| Camera Model | D435i |
| Firmware Version | 2.41.02657 |
| Operating System & Version | Win 10 |
| Platform | PC |
| Language | python |
The text was updated successfully, but these errors were encountered: