# How to detect the moving directions of multiple objects using Arduino Nicla Vision board?

**URL:** <https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100>\
**Category:** Arduino Boards\
**Created:** [March 17, 2023, 6:12am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100 "2023-03-17T06:12:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeongmingg](https://avatars.discourse-cdn.com/v4/letter/y/96bed5/32.png) [@yeongmingg](https://forums.openmv.io/u/yeongmingg)\
**Post date:** [March 17, 2023, 6:12am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/1 "2023-03-17T06:12:57Z")

</div>

This is my FYP object. What I found about optical flow on the blog was to move the camera. What if I want to let the board stay stationary and detect the moving direction of captured object (real-time detection) and count the number of object at the same time? Any insights would be helpful. Thanks guys.

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [March 17, 2023, 11:58am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/2 "2023-03-17T11:58:05Z")

</div>

i use only find blobs for this  
but in my project i have clear blobs.  
do you have also?  
do you have an image of these objects already?

https://www.tiktok.com/embed/v2/7188874176768314630

---

<div class="post-metadata">

**Author:** ![yeongmingg](https://avatars.discourse-cdn.com/v4/letter/y/96bed5/32.png) [@yeongmingg](https://forums.openmv.io/u/yeongmingg)\
**Post date:** [March 18, 2023, 12:12am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/3 "2023-03-18T00:12:10Z")

</div>

No. To count the objects I am going to use FOMO but I don’t know how to detect the direction of moving objects (the direction here refers to the angle of moving objects w.r.t the camera). Is this possible to be done by Nicla Vision board?

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [March 18, 2023, 9:12am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/4 "2023-03-18T09:12:41Z")

</div>

Dear friend ,  
in fact the camera doesnt really know if it is moving or if it is in fixed potition.  
Use the same way as others.  
Did you try frame differencing and blob solution?

---

<div class="post-metadata">

**Author:** ![yeongmingg](https://avatars.discourse-cdn.com/v4/letter/y/96bed5/32.png) [@yeongmingg](https://forums.openmv.io/u/yeongmingg)\
**Post date:** [March 18, 2023, 11:11am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/5 "2023-03-18T11:11:45Z")

</div>

Can I have the sample code that you are using. I can use it as reference. Thank you

---

<div class="post-metadata">

**Author:** ![oramafanis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/oramafanis/32/1783_2.png) [@oramafanis](https://forums.openmv.io/u/oramafanis)\
**Post date:** [March 18, 2023, 11:57am UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/6 "2023-03-18T11:57:16Z")

</div>

i dont have a code for your application unfortunatelly.

WHat did you tried so far?

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [March 18, 2023, 2:22pm UTC](https://forums.openmv.io/t/how-to-detect-the-moving-directions-of-multiple-objects-using-arduino-nicla-vision-board/8100/7 "2023-03-18T14:22:50Z")

</div>

You have to write code to take object positions and then determine the direction given detections between frames. Our API mainly covers single image detections. If you want between frame detections you need to write Python code for that.
