Is it physically possible to have the iphone camera detect motion? If so, How do you do it?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mean technically 🙂 ? Physically it already does (in the sense of taping motion).
Technically you could use the interfaces defined in
AVFoundation.framework, create bitmaps from selected frames and compare them. Usually you would make the images monochromatic (or turn them into binary images, it depends on your actual project), and compare the pixels. If a particular amount of connected pixels has changed, there must have been motion.You would convert the images color space to gray-scale to have a better performance when comparing. It depends again on your project how many shades of gray you need. The picky part is the comparing algorithm for sure. A naive method would be just to count the changed (connected) pixels (making the image gray-scale can save you a lot of false positives). You could also do a Binary Search