It takes so long --> many frames
조회 수: 3 (최근 30일)
이전 댓글 표시
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
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!