depthai-ros icon indicating copy to clipboard operation
depthai-ros copied to clipboard

Different fps for video and preview output

Open saching13 opened this issue 2 years ago • 3 comments

Is it possible to modify the code such that the frame rates for video and preview output are different? I'm using the camera on a resource contraint platform and want to lower the computational burden. As an example I would like to have 30 fps for the preview output and 2 fps for the video output.

Alternatively, could there be a ROS service to capture still images at the full sensor resolution?

Moving from here

saching13 avatar Nov 19 '22 04:11 saching13

cc: @alexswerner

saching13 avatar Nov 19 '22 04:11 saching13

@alexswerner Yes. that should be possible. Either you can create a script node and pass the video output to throttle and send at 2fps. Or you can use throttle tools like this Or like you mentioned you can also have a action or service to make it capture at full res.

saching13 avatar Nov 19 '22 04:11 saching13

Just got back to this. Thanks for the reply. When you write script node, you mean a python script which republishes the messages at a lower rate? I'm not sure if that would serve the purpose of reducing the computational (i/o) burden on the cpu as the camera whould then still transfer the full-size images at full rate. Or am I mistaken?

alexswerner avatar Nov 28 '22 23:11 alexswerner