Domanda

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?

È stato utile?

Soluzione

Your outputs are cell-arrays.

>> Y = cat(3, Y{:} ); 

should do the trick for you.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top