vid=VideoReader("Pokus č 4. (1).avi")
numberOfFrames = vid.NumFrames;
framesToRead = 1: 4000 : numberOfFrames;
for k = 1 : length(framesToRead)
thisFrame = read(vid, framesToRead(k));
Rpokus=rangefilt(gray,nHood);
Rpokus=medfilt2(Rpokus,[7 7]);
Rpokus=imfill(Rpokus,"holes");
Rpokus=imclose(Rpokus,SE);
Rpokus=imbinarize(Rpokus);
Rpokus = bwareaopen(Rpokus, 200);
Rpokus=imclearborder(Rpokus);
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