-
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
Question - Reduce RGB resolution on post capture but get same results as capture #10126
Comments
Hi @Camilochiang A post-processing filter called Decimation can be used to reduce the resolution of depth and RGB streams. The decimation filter can be tested in the RealSense Viewer tool by going to the RGB section of the options side-panel and expanding open the Post-Processing category, then expanding open the Decimation Filter option. Increasing the decimation value from its default of '2' intelligently reduces the resolution. The RGB images below, taken in the Viewer with a D435i, show a scene at the default of '2' and at the maximum of '8'. Decimation = 2 Decimation = 8 If you need the resolution to be directly changed from one to another, another approach would be to define custom stream configurations with a cfg instruction (as you are already doing in your script above). Start the program with a 1920x1080 RGB resolution defined and perform the 3D reconstruction activity first. Then stop the pipeline, set a new cfg configuration of 640x480 RGB and re-start the pipeline to continue at the low resolution to perform the machine learning activity. |
Hei @MartyG-RealSense Thanks for your answer once again! The problem is that I need both resolutions at the same time . No suggestions how to achieve the same results than decimation on python? If you can tell me where i can find the code, I can also have a look. Thanks! |
You could possibly use multiprocessing on Python to do two different activities at the same time. For example, a past use of it was to stream RGB continuously whilst also independently writing frames to video without interrupting the stream. Details of that case are in the link below. There are not many Python multiprocessing scripting references available though other than the ones in the links below. |
Great. Thanks Marty! i Also found that Thanks! |
Sorry, btw. This do not solve the problem of image aspect, as decimation preserve the aspect ratio. Any suggestions? |
Another approach you could consider would be to set up two separate pipelines with their own individual cfg config. There is a Python example of doing this in #1735 (comment) |
Hei.
Example code to compare results
Where color_frame_full and color_frame_reduced should give similar results.
I hope that my question is clear. Thanks in advance!
The text was updated successfully, but these errors were encountered: