Skip to content

Generation Code Explanation

Christopher Rodriguez edited this page Jul 25, 2017 · 1 revision

How It Works

The droplet generation script is fairly straightforward.

  • Split the target video into frames and save these images into the frames directory.
  • For each frame, crop the image to the user defined detection box.
  • Blur the image.
  • Apply Canny's edge detection.
  • Get the average pixel value in the frame.
  • Once all frames are processed, smooth the resulting data using the input weights.
  • Find the local maxes of this data set.
  • For each local max, get the detection box at that frame.
  • Find the convex hull area of the detected contours of the frame.
  • Save this area as the droplet area in pixels.
  • The drop generation rate is the number of local maxes divided by the number of frames.
  • Convert the drop areas by multiplying by the conversion factor (user drawn distances divided by user drawn pixel distance) squared.
  • Convert the drop generation by multiplying by FPS

Clone this wiki locally