Closed MOONBEAR0703 closed 5 years ago
Hi, @amroamroamro ! I found that my mexopencv in the matlab, it would be stuck in someplace and didn't show error except 'busy running'.
Please provide a useful report with reproducible steps and relevant code.
NO, it didn't traceback to any useful information.
And when I make
, it indicates gcc version is high, it required 4.9.x but mine is 5.5.0, however, it shows mex completely.
I stepped into this line
https://github.com/ergysr/DeepCC/blob/ab89f0a82a6b603d87c508b2c3ddc217d7075d6e/src/L3-identities/getTrajectoryFeatures.m#L31
and it jumped to this function DukeVideoReader.m
https://github.com/ergysr/DeepCC/blob/ab89f0a82a6b603d87c508b2c3ddc217d7075d6e/src/duke/DukeVideoReader.m#L68
where back_frame was increasing continuously thus it seemed never end.
That sounds like an issue to ask over at DeepCC not here in mexopencv.
I'm not familiar with their code base, but it looks like they are seeking in a video by reading frame-by-frame. According to their readme file, you first have to download the video dataset.
Note that cv.VideoCapture
does not raise an error if you specify a non-existing video file.
Consider the following:
vid = cv.VideoCapture('non-existant-file.mts');
while vid.PosFrames < 10
frame = vid.read();
end
The above code will never return if the video file doesn't exist, frame
will be 0x0 empty and PosFrames
remains at 0.
You (they) should add checks to guard against unexpected outcomes:
vid = cv.VideoCapture('non-existant-file.mts');
assert(vid.isOpened()); % <===
while vid.PosFrames < 10
frame = vid.read();
if isempty(frame), break; end % <===
end
did you forget to write a description of the issue?