# \[SOLVED\] What is optical flow?

**URL:** <https://onehack.st/t/solved-what-is-optical-flow/60506>\
**Category:** Discussion & Solutions\
**Tags:** solved\
**Created:** [October 17, 2019, 11:30am UTC](https://onehack.st/t/solved-what-is-optical-flow/60506 "2019-10-17T11:30:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Au\_chi\_wai](https://onehack.st/user_avatar/onehack.st/au_chi_wai/32/17928_2.png) [@Au\_chi\_wai](https://onehack.st/u/Au_chi_wai)\
**Post date:** [October 17, 2019, 11:30am UTC](https://onehack.st/t/solved-what-is-optical-flow/60506/1 "2019-10-17T11:30:20Z")

</div>

How to calculate optical flow of a video in python? How to calculate? How to separate frames of a video based on a threshold using optical flow?

---

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [October 18, 2019, 6:23pm UTC](https://onehack.st/t/solved-what-is-optical-flow/60506/2 "2019-10-18T18:23:38Z")

</div>

## Do you mean, opencv motion detection tracking?

[Motion Estimation with Optical Flow](https://nanonets.com/blog/optical-flow/)

[Basic motion detection and tracking with Python and OpenCV](https://www.pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-opencv/)

---

<div class="post-metadata">

**Author:** ![Au\_chi\_wai](https://onehack.st/user_avatar/onehack.st/au_chi_wai/32/17928_2.png) [@Au\_chi\_wai](https://onehack.st/u/Au_chi_wai)\
**Post date:** [October 18, 2019, 7:56pm UTC](https://onehack.st/t/solved-what-is-optical-flow/60506/3 "2019-10-18T19:56:48Z")

</div>

I have a video where I want to find the direction of motion using optical flow, also I need the find a threshold, if the motion between two frames is more than this threshold than i will consider that motion, how to find that threshold?

---

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [October 18, 2019, 9:12pm UTC](https://onehack.st/t/solved-what-is-optical-flow/60506/4 "2019-10-18T21:12:37Z")

</div>

# [Using Optical Flow to find direction of Motion](http://www.cs.utah.edu/~ssingla/CV/Project/OpticalFlow.html)

* * *

# [The tutorial explains the threshold function in OpenCV with examples](https://www.learnopencv.com/opencv-threshold-python-cpp/)

* * *

# [Thresholding Operations using inRange](https://docs.opencv.org/3.4/da/d97/tutorial_threshold_inRange.html)

* * *

# [2 frames opencv related stackoverflow search queries](https://www.google.com/search?q=allinurl:+two+frames+opencv+site:stackoverflow.com&rlz=1C1CHBF_enIN858IN858&sa=X&ved=2ahUKEwiooZn02qblAhXDinAKHTUKDUcQrQIoBDABegQIBRAN&biw=1536&bih=722)
