Commit 018b3a7fa363c1ae3801eb69ffaa02730928d4d1

Better sampling of frames
testi.hs
(8 / 4)
  
1010
1111estimateBackground cap =
1212 do
13 let n = 15
14 m = 1000 -- FrameSkip
13 let noFrames = getNumberOfFrames cap
14 n = 25
15 m = noFrames `div` n
16 print ("Frames",noFrames,"Skip",m)
1517 -- First take n frames
1618 frames <- replicateM n (replicateM_ m (dropFrame cap)
17 >> putStrLn "X" >> getFrame cap
18 >>= convertToGrayScale)
19 >> print ("Frame",getFrameNumber cap)
20 >> getFrame cap
21 >>= convertToGrayScale)
22 >>= return . drop 10
1923 sequence_ [saveImage ("frame_"++show i++".png") img
2024 | img <- frames | i<-[1..]]
2125