Can a Matlab figure window display 4k video feed at 30FPS?

1 Ansicht (letzte 30 Tage)
cr
cr am 1 Dez. 2020
Bearbeitet: Walter Roberson am 1 Dez. 2020
That's the question in title -for an RGB 8-bit video stream. Or do performance limilations preclude Matlab from achieving a smooth enough frame rate? Is there is known limit for data rate to display in Matlab figure window. E.g. using preview() in image processing toolbox.
Thanks.

Antworten (1)

Walter Roberson
Walter Roberson am 1 Dez. 2020
Bearbeitet: Walter Roberson am 1 Dez. 2020
There might potentially be some system in which MATLAB could keep up with that, such as with a high performance graphic card and a gigE camera, but most systems would not be capable of it.
4k resolution is about 8.3 megapixel. Multiply by 3 color components of 8 bits and multiply by 30 fps, and the overall data transfer requirements are just under 6 gigabits per second, without taking into account overheads.
6 gigabits per second requires one of:
  • USB 3.2 generation 2 (10 gigabits per second)
  • 10 gigabit Ethernet
  • Thunderbolt 1 configured creatively, in theory, but Thunderbolt 2 or later in practice (dual bidirectional lanes each 20 gigabits)
USB3.0 is not able to keep up.
That is just the hardware issues. Issues about generating ffast enough interrupts and turning it around and out to the render thread.
I would not say that it is outside of the capacity of all current systems, but not common.
  2 Kommentare
cr
cr am 1 Dez. 2020
Bearbeitet: cr am 1 Dez. 2020
Walter,
The camera I'm using is a USB3 device and it does show butter smooth real-time feed in vendor software -running an Intel NUC 8th gen i5 with 32GB RAM. But the same video format e.g. RGB8, BayerRG8, BayerRG12, shows up very very jerky in Matlab figure window and preview window. I took a video grab and estimated the framerate to be 3-4 FPS while the same settings and environment yields good smooth video in vendor sw at 15-45FPS depending on the selected format. Matlab preview() window does show the same 15-45FPS but the refresh rate is remarkably lower. Do you think this is not a limitation of Matlab but hardware?
Thanks.
p.s. I even tried setting java heap memory to max allowed 8GB.
Walter Roberson
Walter Roberson am 1 Dez. 2020
Bearbeitet: Walter Roberson am 1 Dez. 2020
USB3 does not have enough bandwidth for that device at 30 fps unless the data is transferred in compressed form. USB3 is 5 gigabits per second raw transfer rate.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by