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