1

私のコードには、次のスニペットを使用して描画する 3D キューブがあります。

ver = [0 0 0; 0 1 0; 1 1 0; 1 0 0; 0 0 1; 0 1 1; 1 1 1; 1 0 1];
face = [1 2 3 4; 2 6 7 3; 4 3 7 8; 1 5 8 4; 1 2 6 5; 5 6 7 8];
patch('Vertices',ver,'Faces',face,'FaceVertexCData',hsv(6),'FaceColor','flat');

フレームごとに処理しているビデオがあります。

videoFile = vision.VideoFileReader(filename);   
videoPlayer = vision.VideoPlayer();
frame = step(videoFile); 

このビデオ フレームに立方体を描画/挿入したいと考えています。matlabでどのように可能ですか。ありがとう

4

1 に答える 1

1

Unfortunately you cannot use MATLAB graphics objects, such as a patch, in vision.VideoPlayer. vision.VideoPlayer can only display images, so if you want to overlay graphics onto an image you have to draw directly into the pixels. Try using the insertShape function.

于 2014-05-20T18:20:43.540 に答える