Convert ARFrame to ImageUInt8


#1

I’m trying to convert the ARFrames passed on to the onFrameReceived function to ImageUInt8. Is there an easy, straight forward way to do so? All I could find seems to be quite clumsy.

Thanks in advance!


#2

When you set the video stream callbacks, you pass a decoder configuration callback.

This callback will be called with a codec. In this codec there are h264 parameters which contain the Sequence Parameter Set (sps) and Picture Parameter Set (pps) of the stream.
In the SPS lays information about the video size (even though it is a bit cryptic :smile: ).
Maybe this SO question can help you: https://stackoverflow.com/questions/21774212/how-to-calculate-video-dimensions-using-sps-pps-information-in-h-264-stream