Undefined function or variable 'aviread'. >> aviread('traffic.avi'); Undefined function or variable 'aviread'.
0 comentarios
Respuestas (3)
0 comentarios
0 comentarios
The error you're encountering may be caused by several factors in MATLAB version R2016. Here are some steps you can try to resolve the issue:
1. *Check the Video Format*: Ensure that the `traffic.avi` file is in the correct format and is not corrupted. You can verify this by opening the video in a different player.
2. *Use `VideoReader`*: In newer versions of MATLAB, it's recommended to use the `VideoReader` object instead of `aviread`. You can try the following code: ```matlab videoObj = VideoReader('traffic.avi'); N = 0; while hasFrame(videoObj) frame = readFrame(videoObj); N = N + 1; % Here you can process each frame, e.g., display it imshow(frame); pause(1/videoObj.FrameRate); % Pause according to the frame rate end ```
3. *Check File Path and Permissions*: Make sure MATLAB has access to the file and that the path to `traffic.avi` is correctly set.
4. *Update MATLAB*: If possible, consider updating to a newer version of MATLAB, as newer versions include fixes and improvements that may resolve compatibility issues.
5. *Consult Documentation*: Review the MATLAB documentation for `aviread` and `VideoReader` to ensure you're using the correct syntax and options.
If none of these steps help, please provide more information about the specific error message you're seeing so that we can better diagnose the issue.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!