Answers.Body: <p>After a quick scan, it would seem that, in the history of object detection, machine learning has always been at the forefront. Before then, it would just be a heuristic approach.</p>
  
  <p>For a quick answer, here: <a href="https://towardsdatascience.com/real-time-object-detection-without-machine-learning-5139b399ee7d" rel="nofollow noreferrer">https://towardsdatascience.com/real-time-object-detection-without-machine-learning-5139b399ee7d</a></p>
  
  <p>That goes over object detection without using machine learning in OpenCV</p>
  
  <p>That being said, there are some segments of computer vision that are not strictly machine learning. For example, a commonly used algorithm <a href="https://www.learnopencv.com/selective-search-for-object-detection-cpp-python/" rel="nofollow noreferrer">Selective Search</a> for region proposal doesn't use machine learning, and the <a href="https://en.wikipedia.org/wiki/Teknomo%E2%80%93Fernandez_algorithm" rel="nofollow noreferrer">TF Algorithm</a> for background generation doesn't either.</p>
  
  <p>But when it comes to object detection, the gap between machine learning and all other methods is so sheer that ML is the only method really considered today.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-02T21:00:14.493Z
Answers.Text: Thank you very much for your explanation. But I want to detect only moving objects in a series of frames. In a brute force algorithm, I think that we can calculate optical flows and then using the gradient of optical flow that we call motion boundary histograms(MBH). Each object that has value in MBH is a moving object. I search for such solutions in opencv. And I need to know that, are backgroundSubtractor functions in opencv doing this work for me? Or they also subtract fixed objects?
Answers.UserDisplayName: Ali Abdari
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-02T05:06:31.877Z
Answers.LastActivityDate: 2019-12-02T05:06:31.877Z
Answers.UserDisplayName: Recessive
Body: <p>I want to detect moving objects in a surveillance video without using machine learning tools (like neural networks).
  Is there a simple way in the OpenCV library? What is an efficient solution for this purpose?</p>
  
Tags: <computer-vision><object-detection><image-processing>
Title: How can I detect moving objects in a video by OpenCV without using deep learning techniques?
UserDisplayName: Ali Abdari
ThreadText: # How can I detect moving objects in a video by OpenCV without using deep learning techniques?
  
  (Asked by: username_0 on 2019-11-29)
  
  I want to detect moving objects in a surveillance video without using machine learning tools (like neural networks).
  Is there a simple way in the OpenCV library? What is an efficient solution for this purpose?
  
  **Tags:** computer-vision, object-detection, image-processing
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-12-02. Score: 2
  
  After a quick scan, it would seem that, in the history of object detection, machine learning has always been at the forefront. Before then, it would just be a heuristic approach.
  
  For a quick answer, here: <https://towardsdatascience.com/real-time-object-detection-without-machine-learning-5139b399ee7d>
  
  That goes over object detection without using machine learning in OpenCV
  
  That being said, there are some segments of computer vision that are not strictly machine learning. For example, a commonly used algorithm [Selective Search](https://www.learnopencv.com/selective-search-for-object-detection-cpp-python/) for region proposal doesn't use machine learning, and the [TF Algorithm](https://en.wikipedia.org/wiki/Teknomo%E2%80%93Fernandez_algorithm) for background generation doesn't either.
  
  But when it comes to object detection, the gap between machine learning and all other methods is so sheer that ML is the only method really considered today.
  
  > **Comments:**
  > **username_0**: Thank you very much for your explanation. But I want to detect only moving objects in a series of frames. In a brute force algorithm, I think that we can calculate optical flows and then using the gradient of optical flow that we call motion boundary histograms(MBH). Each object that has value in MBH is a moving object. I search for such solutions in opencv. And I need to know that, are backgroundSubtractor functions in opencv doing this work for me? Or they also subtract fixed objects?  
  
  ---
  
  