Reputation: 315
I am using this function I got from the internet:
>>[Y,U,V]=yuv_import('test.yuv',[176 144],150,0)
I got this from: Convert YUV CIF 4:2:0 video file to image files
It prints out the Y, U and V components of the yuv file test.yuv. When I typed:
>>Y
It displayed:
Y =
Columns 1 through 5
[144x176 double] [144x176 double] [144x176 double] [144x176 double] [144x176 double]
...............
Columns 146 through 150
[144x176 double] [144x176 double] [144x176 double] [144x176 double] [144x176 double]
And..
>>size(Y)
displayed:
ans =
1 150
Doing the same for U and V components also showed the same results.
And also..
>>Y(150)
displayed:
ans =
[144x176 double]
What I want is make an array for Y, U and V that has the dimensions [numberOfFrames height width] or [150 144 176]. How can I do this?
Upvotes: 1
Views: 576
Reputation: 114966
Your outputs are cell-arrays.
>> Y = cat(3, Y{:} );
should do the trick for you.
Upvotes: 1