Closed Guan9Wu closed 4 weeks ago
Hi @Guan9Wu If you are using the RealSense Viewer tool then the 1280x720 frames are already being downsampled. This is because a post-processing filter called the Decimation Filter is enabled by default in the Viewer. When a bag is imported into the Viewer and played back, the Decimation filter is applied to the bag data in real-time.
The default value of the filter is '2', so 1280x720 is downsampled by half to 640x360.
However, downsampling the resolution is not the same as cropping it by using a lower resolution directly. Below are images of 1280x720 downsampled to 640x360 (upper image) and 640x480 directly with the Decimation Filter disabled (lower image). You can see a significant reduction in the viewpoint size in the 640x480 image.
1280x720 downsampled
640x480 direct
It is possible to crop an image in code using a bounding box, though it is a complicated process. A RealSense user at https://github.com/IntelRealSense/librealsense/issues/2016#issuecomment-403804157 approached the problem by using a 'struct' to define minimum and maximum values for X and Y and then getting the point cloud points.
Hi @Guan9Wu Do you require further assistance with this case, please? Thanks!
Case closed due to no further comments received.
Issue Description
I have recorded a .bag file that includes a stream with a 1280x720 resolution for both color and depth frames. I now require the aligned frames to be at a 640x480 resolution, but the RealSense Viewer does not allow for resolution adjustment of recorded frames. Here's my proposed approach:
Extract the aligned frames at their original 1280x720 resolution. Subsequently, crop them to the desired 640x480 resolution. However, I am uncertain if the depth and color frames obtained through this method would be equivalent to those recorded directly at 640x480 resolution. If there are discrepancies, I would appreciate suggestions for alternative methods.