Please select Into the mobile phone version | Continue to access the computer ver.
And now we got images. :)
Uploading and Loding Picture ...(0/1)
o(^-^)o
BGA
First Officer
United States
Offline

The image below is a single frame captured directly from the S1 video stream from external code without going through the Robomaster app at all! It seems there is some tweaking to do (look at all the banding on the image) but this basically mean I can now capture the video stream and feed it to something like OpenCV running locally on the controlling machine.

The code is basically hacked up now to save the single frame (code is in my repository) but if this works, everything else will related to video capture will.

Robomaster S1 camera feed capture

Robomaster S1 camera feed capture

2019-12-17
Use props
Duane Degn
First Officer
Flight distance : 425755 ft
United States
Offline

This is fantastic! Thank you!
2019-12-17
Use props
sevreNniarB
lvl.4
Germany
Offline

Thank you BGA, time to take over the world

2019-12-18
Use props
MarkusXL
Second Officer
United States
Offline

WoW Bravo, and excellent hack!

Curious to what the usable frame rate is?

2019-12-19
Use props
BGA
First Officer
United States
Offline

MarkusXL Posted at 12-19 16:46
WoW Bravo, and excellent hack!

Curious to what the usable frame rate is?

The S1 transmits at 30 FPS so that is what I got. I did an initial attempt to hook it up to OpenCV but failed (I am pretty sure it is mostly because I have to run this on Windows due to the dependency on the unitybridge.dll file).

I am considering an IPC approach where I isolate the windows code by wrapping it around an IPC server that I can run with wine. Then I start it from the actual Linux code and this minimizes the windows dependency.

The interesting thing is that here the unitybridge.dll is both a blessing and a curse. A blessing because it decodes the video stream and what I get is actually fully decoded RGB24 frames. No need to do any decoding. And a curse because the same thing results in each frame being around 2.7 MB. at 30 fps this is 81 mb per second which is high enough to make me worry about the IPC implementation. We will see.
2019-12-20
Use props
DanMan32
lvl.4
Flight distance : 2489501 ft
United States
Offline

Sounds like you're getting uncompressed frames.   I did a quick calculation: a frame being 1440x1080 (assuming 1080p 4:3 aspect ratio) with 3 bytes per pixel (8 bits per RGB) comes out to 4.6MB.  With 720p I calculate 2MB.   With 720p at 16:9 I get 2.7MB.   Then again you did say unencoded, which means raw frames.
2020-1-6
Use props
BGA
First Officer
United States
Offline

DanMan32 Posted at 1-6 08:19
Sounds like you're getting uncompressed frames.   I did a quick calculation: a frame being 1440x1080 (assuming 1080p 4:3 aspect ratio) with 3 bytes per pixel (8 bits per RGB) comes out to 4.6MB.  With 720p I calculate 2MB.   With 720p at 16:9 I get 2.7MB.   Then again you did say unencoded, which means raw frames.

Not sure I understand the point you are trying to make but, in any case (and as I mentioned in one of my replies), unitybridge does the decoding and I get decoded frames. I also showed the math in my reply (it is 2.7 Mb per frame @720p or 81 mb/s). Note this is only relevant because I am uising an IPC solution between Wine and a native linux app to be able to do Linux development. The actual S1 stream is H2664 and is a lot smaller than what you get with unencoded frames, of course.
2020-1-6
Use props
DanMan32
lvl.4
Flight distance : 2489501 ft
United States
Offline

I know many worry about video quality based on bitrate.   I didn't catch at first that by "decoded", you meant full video uncompressed, which indeed is 2.7MB when video is 1280x720.  I would think that a good thing, unless transmitting it over slow channels that can't handle the rate.
2020-1-6
Use props
Lucas775
Captain
Flight distance : 12685266 ft
  • >>>
United States
Offline

Awesome capture.
2020-2-8
Use props
BGA
First Officer
United States
Offline


Thanks. You can also find actual videos in other posts.
2020-2-9
Use props
Lucas775
Captain
Flight distance : 12685266 ft
  • >>>
United States
Offline

BGA Posted at 2-9 18:11
Thanks. You can also find actual videos in other posts.

I will sure look for them.  
2020-2-9
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules