VideoReader Motion JPEG 2000 format does not work

조회 수: 1 (최근 30일)
Evan
Evan 2024년 7월 17일
편집: Walter Roberson 2024년 7월 19일
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
Umar
Umar 2024년 7월 18일
편집: Walter Roberson 2024년 7월 19일
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!

댓글을 달려면 로그인하십시오.

답변 (1개)

colordepth
colordepth 2024년 7월 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!

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by