3

I'm creating motion detect app for ios. when camera on live any object passes the camera like person , animal. than i want detect motion feature. how's it possible?

  • Your question is far too broad, there are tons of possibilities. There is large documentation aver the web on this subject, you should search for it. Keywords: computer vision, motion detection, object detection, ... – Louis Lac Apr 19 '20 at 17:11
  • Stack Overflow is not a team of developers that develop your solution for free, you should search and try for yourself first. SO is for asking a specific question about a specific problem in case you did not find the solution elsewhere. – Louis Lac Apr 19 '20 at 17:14

1 Answers1

7

I suggest you get familiar with the AVFoundation framework to understand how to get live video frames using the camera of an iOS device. A good starting point is Apple's famous sample AVCam, which should get you familiar with all the camera concepts.

As the next step, figure out how to do the movement detection. The simplest algorithm for that would be the background subtraction. The idea is to subtract two consecutive frames one from another. The areas without movement just cancel each other and become black, while the areas with movements show some nonzero values.

Here's an example of background subtraction in the OpenCV framework.

If in the end, you decide to use OpenCV (which is a classic Computer Vision framework which I definitely recommend), then you'll need to integrate OpenCV into your iOS app. You can see a short tutorial here.

I tried to show you some pointers which could get you going. The problem (how you presented it) is definitely not an easy one, so good luck!

Cerovec
  • 1,273
  • 10
  • 19