Concatenate two video together one below the other
조회 수: 5 (최근 30일)
이전 댓글 표시
I am trying to play two video files one below the other at the same time. The videos are of different dimension. I tried this code but get an error saying "Dimensions of matrices being concatenated are not consistent."
I understand the error because frame sizes are different. but how to correct the code?
Frame2:- 681x1429x3 single
Frame1:- 525x700x3 single
Also, I tried to play two videos of same dimension, it worked but was zoomed in . How do I zoom out and play the videos as is?
if true
{
vid1 = vision.VideoFileReader('R1.avi');
vid2 = vision.VideoFileReader('FR2.avi');
vidP = vision.VideoPlayer;
while ~isDone(vid1)
frame1 = step(vid1);
frame2 = step(vid2);
frame = vertcat(frame1, frame2);
step(vidP,frame);
end
release(vid1);
release(vid2);
release(vidP);
}
end
Thank you. Any help is much appreciated.
댓글 수: 0
답변 (1개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!