AVI TO YUV conversion

5 visualizaciones (últimos 30 días)
Chaine San Buenaventura
Chaine San Buenaventura el 6 de Oct. de 2013
Respondida: Balaji el 7 de Nov. de 2023
AVI to YUV conversion in Matlab please :)

Respuestas (1)

Balaji
Balaji el 7 de Nov. de 2023
Hi Chaine,
To convert an AVI video file to YUV format in MATLAB, you can use the `VideoReader` and `VideoWriter` functions along with some additional processing. Here's an example of how you can perform the conversion:
aviFileName = 'input.avi';
yuvFileName = 'output.yuv';
videoReader = VideoReader(aviFileName);
videoWriter = VideoWriter(yuvFileName, 'YUV');
open(videoWriter);
while hasFrame(videoReader)
frameRGB = readFrame(videoReader);
frameYUV = rgb2ycbcr(frameRGB);
writeVideo(videoWriter, frameYUV);
end
close(videoWriter);
Thanks
Balaji

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by