What is the format of camera frames received using the kvswebrtcViewer? #1948
Unanswered
setareh-soltanieh
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I'm still working on the same issue, but haven't figured out how to solve this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on integrating this codebase to stream camera frames from my mobile device into ROS. So far, I've successfully created a ROS package from the project and converted the Viewer's code from C to C++, allowing me to create a ROS node from this codebase.
Now, I'm aiming to publish my camera frames to a ROS topic (sensor_msgs/Image). However, to achieve this, I need to read each image and convert it to the cv::Mat format before publishing it to ROS.
My challenge lies in understanding how the image data is being received. I've observed that the PBYTE->frameData pointer points to the first element of the image buffer. However, without knowledge of the image's width and height, I'm unable to correctly convert it to a cv::Mat object.
Could someone provide guidance on how I can retrieve the width and height of the image data in order to properly convert it to a cv::Mat format?
Thank you for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions