It takes so long --> many frames

2 次查看(过去 30 天)
Eliska Paulikova
Eliska Paulikova 2022-10-22
评论: Sai 2023-2-27
vid=VideoReader("Pokus č 4. (1).avi")
while hasFrame(vid)
frame=readFrame(vid);
numberOfFrames = vid.NumFrames;
framesToRead = 1: 4000 : numberOfFrames;
for k = 1 : length(framesToRead)
% Extract the frame from the movie structure.
thisFrame = read(vid, framesToRead(k));
gray=im2gray(thisFrame);
nHood=true(3);
Rpokus=rangefilt(gray,nHood);
Rpokus=medfilt2(Rpokus,[7 7]);
Rpokus=imfill(Rpokus,"holes");
SE=strel("disk",6);
Rpokus=imclose(Rpokus,SE);
Rpokus=imbinarize(Rpokus);
Rpokus = bwareaopen(Rpokus, 200); %vše tvořený méně než "n" pixely se odstraní
Rpokus=imclearborder(Rpokus);
clear edge
Rpokus=edge(Rpokus);
imshow(Rpokus)
end
pause(0.1)
end
Hi, I have a problem, I have video with more than 100 000 frames. But it still take a long time and also it does not work at all a mean the segmentation. Please help
  1 个评论
Sai
Sai 2023-2-27
Hi Eliska,
Can you please send the video file (Pokus č 4. (1).avi) so that I could try to to reproduce the issue at my end?

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by