Effacer les filtres
Effacer les filtres

VideoReader Motion JPEG 2000 format does not work

25 vues (au cours des 30 derniers jours)
Evan
Evan le 17 Juil 2024 à 14:49
Modifié(e) : Walter Roberson le 19 Juil 2024 à 6:21
R2024a VideoReader does not import .mj2 files correctly. When inspecting the frames they are blank. R2023b has no issues importing .mj2 files. Here's the coded tested between both matlab verisons. Any suggestions for getting VideoReader working in 2024a?
% Get selected file
savelocation = "frames.mj2";
% Load frames
v = VideoReader(savelocation);
frames = read(v);
imagesc(frames(:,:,:,400))
  1 commentaire
Umar
Umar le 18 Juil 2024 à 3:14
Modifié(e) : Walter Roberson le 19 Juil 2024 à 6:21
Hi Evan,
One possible solution to this problem could be to try using a different approach to reading .mj2 files in MATLAB R2024a. You can consider using the mmfileinfo function to gather information about the multimedia file, followed by using the mmread function to read the frames from the .mj2 file. Here is an example of how you can modify your code to potentially resolve this issue:
% Get selected file
savelocation = "frames.mj2";
% Get information about the multimedia file
info = mmfileinfo(savelocation);
% Read frames from the multimedia file
frames = mmread(savelocation);
imagesc(frames.frames(400).cdata);
By utilizing these functions, you may be able to successfully read and display frames from .mj2 files in MATLAB R2024a. For more information on these functions, please refer to
Good luck!

Connectez-vous pour commenter.

Réponses (1)

Deep
Deep le 19 Juil 2024 à 5:19
Hi Evan,
I understand that when you are importing an MJ2 file using ‘VideoReader’, it works fine in MATLAB R2023b but gives blank frames in MATLAB R2024a.
This is a known bug in MATLAB R2024a, here is the link to the bug report:
Unfortunately, there are no workarounds as per the bug report.
I hope my answer was helpful!

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by