How do I read each frame of a video?
    8 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    L'O.G.
 le 3 Mai 2023
  
    
    
    
    
    Réponse apportée : Image Analyst
      
      
 le 4 Mai 2023
            For an .avi file, I can read in the file using video = VideoReader(filename) and then read the first frame using readFrame(video) which gives me an array of type uint8. How do I read aeach frame?
0 commentaires
Réponse acceptée
  Kevin Holly
    
 le 3 Mai 2023
        Note, you can save a 3D/4D matrix of the video if memory permits by defining a variable as such:
ii = 1;
while hasFrame(vidObj)
    vidFrame(:,:,:,ii) = readFrame(vidObj); %vidFrame(:,:,:,ii) for color image and vidFrame(:,:,ii) for gray image
    ii = ii+1;
end
0 commentaires
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!