MATLAB: How To redirect the Ego-centric projective perspective image using ‘chasePlot’ method in the ‘Actor’ class from window to a variable

Automated Driving ToolboxdrivingscenariodrivingscenariodesignerMATLAB

Hello, Matlab Community,
The chasePlot method in Actor class for drivingScenario is just great, it's save alot time for display the Ego-centric projective perspective of the actor in the arguments field.
but i want to save the image into, a classic array of pixels and there 3 channels. If someone could help, I be very grateful.
I tried to use plot method but the source code is absent.
note : i am using matlab R2020a in windows 10.

Best Answer

One solution :
>>fig = figure();
>>ax = axes(fig);
>>chasePlot(scenarioHandler, 'Parent', ax);
>>frame = getframe(ax);
>>frame
frame =
struct with fields:
cdata: [275×280×3 uint8]
colormap: []