class_docstr: Use the farnebeck algorithm for the flow-based motion estimator
class_docstr_tok: ["Use","the","farnebeck","algorithm","for","the","flow-based","motion","estimator"]
code: def compute_flow(self, prev_frame_cache, prepared_new_frame):
      # Compute Farnebeck flow
      cv2 = self._cv2
      flow_map = cv2.calcOpticalFlowFarneback(
          prev_frame_cache,
          prepared_new_frame,
          None,
          0.5,
          3,
          15,
          3,
          5,
          1.2,
          0,
      )
  
      return flow_map
  
imports: import time
  import logging
  from abc import ABC, abstractmethod
  import numpy
label_desc: Use image node_id 3 for calling the FarneBeckFlowMotionEstimator obj's underlying member method code with example usage: obj.compute_flow(prev_frame_cache, prepared_new_frame) and returns: flow_map