It takes so long --> many frames
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Sai
el 27 de Feb. de 2023
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?
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!