Image to Video Conversion Error
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to convert one image into a video or motion jpeg using this code.
A = imread('joshheadshot2.jpg');
v = VideoWriter('myFile','Motion JPEG AVI');
open(v)
writeVideo(v,A)
I do not get any errors in the command window; however, when I try to open 'myFile.avi' a dialog box pops up that says "Cannot import from an empty input file." Any suggestions on how I can get this to work?
0 commentaires
Réponses (1)
Image Analyst
le 12 Avr 2019
I presume you are trying to open an avi file with VideoReader(), extract one frame from it, and write lots of the same frame to another output video that you're creating with VideoWriter(). Provide VideoReader() an input file that is not empty. It thinks your avi file is empty for some reason. How many bytes is it? If it's small, attach it to your post above.
2 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!