Is there a way that we can control the iOS device camera to an extent what colors it sees, what shapes it sees ? etc

I'm speaking about the ability to read information before the image is captured.

Consider my question as: Possibility of making an augmented reality game on iOS phones.

I dont find relevant help for my query in internet/iOS developer site. Hence posting here.

  • 1
    \$\begingroup\$ What exactly are you trying to do? You can't really get any information before you capture an image. Apps like some photo apps, allowing you to focus the camera, preview images etc., constantly capture images and shows them, possibly in a lower resolution to make processing faster \$\endgroup\$
    – Mario
    Nov 13 '13 at 14:57
  • \$\begingroup\$ I would like to capture colors from camera. Say, I ask user to show blue color. I need to capture the event when he shows this color to camera. \$\endgroup\$
    – MogambO
    Nov 13 '13 at 17:21
  • 1
    \$\begingroup\$ You need to clarify how you want to implement this before anyone can tell you if that's possible on iOS. Since AR is not strictly defined, you need to give us your definition of that too. \$\endgroup\$
    – MichaelHouse
    Nov 13 '13 at 17:29

If you mean you want your app to detect predetermined patterns using the camera, you will want to capture the result from the camera every few frames, and parse the image for near identical patterns.

If you want to save yourself the trouble of doing all the pattern matching you can use an AR library like the free and open source open frameworks or vuforia. It's very effective with the pattern matching, even at bizarre angles and on cylinders (bottles, cans...).

Here is an example of the tracking capacity of Vuforia. enter image description here http://www.youtube.com/watch?v=OIBHNYxStmA

Vuforia is the only lib I have used. But there are others:


  • \$\begingroup\$ Wow. This is exactly what I'm looking for. Thanks a lot Coyote. \$\endgroup\$
    – MogambO
    Nov 14 '13 at 5:00
  • \$\begingroup\$ @Geeger Before settling on a lib I'd test it to see if fills your needs. If it's just about capturing given colours and shapes you might find a much simpler library. OpenFrameworks would be great for you I think. \$\endgroup\$
    – Coyote
    Nov 14 '13 at 6:10
  • 1
    \$\begingroup\$ @Geeger I edited my answer with a reference to very simple code for color tracking. \$\endgroup\$
    – Coyote
    Nov 14 '13 at 6:14
  • \$\begingroup\$ @Coyote Glad to read that you have experience using Vuforia in iOS, could you please have a quick look at my question here: stackoverflow.com/questions/42035046/… \$\endgroup\$
    – Manuel
    Feb 9 '17 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.