VideoReader Frame Extraction Artifacts and Inversion in MATLAB 2018a

1 回表示 (過去 30 日間)
Arjun Desai
Arjun Desai 2018 年 5 月 11 日
回答済み: Reece Teramoto 2018 年 5 月 16 日
I am had an application running on MATLAB 2015aSP1 that I want to port over to MATLAB 2018. However, I am having an issue with VideoReader script. When I extract a frame from a .mov file using MATLAB 2015aSP1, I am able to acquire the frame.
However, when I run the same set of commands with MATLAB 2018, the extracted frame has artifacts and is inverted. I have posted the code below and attached images of the MATLAB 2015 and 2018 results.
ipPath = 'path ';
obj.FrameObj = VideoReader(ipPath);
obj.NumFrames = round(obj.FrameObj.Duration*obj.FrameObj.FrameRate);
obj.CurrentTime = zeros(obj.NumFrames,1);
obj.CurrFrameIdx = 1;
obj.FrameObj.CurrentTime = obj.CurrentTime(obj.CurrFrameIdx);
frame = readFrame(obj.FrameObj);
figure;imshow(frame)
  2 件のコメント
Walter Roberson
Walter Roberson 2018 年 5 月 11 日
Which operating system are you using? You mention .mov, which hints it might be Mac, since .mov is QuickTime ?
Arjun Desai
Arjun Desai 2018 年 5 月 11 日
using Windows 10

サインインしてコメントする。

採用された回答

Reece Teramoto
Reece Teramoto 2018 年 5 月 16 日
Hi Arjun,
The issue is likely due to this bug regarding the use of graphical hardware acceleration to perform video decoding on certain releases of MATLAB for some Windows systems:
Please try turning off hardware acceleration for video decoding by executing the following before reading in the video:
>> matlab.video.read.UseHardwareAcceleration('off')
As a reference, the following documentation explains the use of graphics hardware for decoding some video types on Windows:

その他の回答 (0 件)

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by