Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    2

    Measure Object With Camera?

    Hi, I am newbie in windows phone development.

    Is it possible measure object with camera?

    I see a lot of applications measure object with camera, example: http://www.windowsphone.com/en-us/st...2-f18a6299a7fe

    Could someone give me a simple example or reference to measure height with camera in Windows Phone?

    My phone is Nokia Lumia 620.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Measure Object With Camera?

    The object isn't measured by the Camera in this example. The App allows you to take a picture and then later measure it manually and add that to the image.

    Another approach is to make an image of an object next to another object of known size. E.g. you put a certain coin next to it and then detect how big that one is in the image and do a comparison.

    The last approach I have seen to achieve this was discussed here: http://developer.nokia.com/Community...ra-(Lumia-520) Although I don't know if someone managed to actually implement it.

  3. #3
    Registered User
    Join Date
    Nov 2013
    Posts
    2

    Re:Measure Object With Camera?

    thanks for the answer.

    so I need to know focal plane of camera for measure object or calculate object,?

    in MSDN, someone managed to calculate height and distance using gyroscopic sensors and trigonometry: http://social.msdn.microsoft.com/For...-phones-camera

    but Nokia 620 does not have gyroscopic sensor.

    I thinking about use Image Recognition for measure object or calculate object, is it possible?
    Last edited by Dimdom; 2013-11-05 at 18:08.

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Measure Object With Camera?

    The basic problem is that an object that is 10x10 cm in size but very close takes up the same space in an image as one that is 10x10 m but farther away. That's why in the linked Thread the idea was to couple it to the focus settings to get a better idea of how far the object is away. Using just the final image data I'd say it's pretty much impossible to do this unless you have an object at the same distance in the picture that you know the size of.

    E.g. you know the Diameter of a 1 € coin. If you place that on a table next to a pack of cigarettes you could detect the coin and infer the size of the object next to it from that known Diameter. It should be some object people would be actually carrying with themselves frequently.

    Perhaps somebody else would know of another way to do it (I would not have thought of using the Gyroscope for exmaple).

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,790

    Re: Measure Object With Camera?

    Trigonometry does not create length from angles. That discussion is a bit hard to believe, regardless of having a gyroscope.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Measure Object With Camera?

    You could in theory use the Accelerometer (if the values it gives are normalized to G's or a similar unit you know how to convert to SI units) using the Gyroscope to remove side effects through rotation to do kind of an "inertial measurement" (speed can be calculated by integrating over the acceleration and distance traveled by integrating over the speed curve). We did this once based only on an accelerometer in a university class but it was quite inaccurate. Perhaps it would do better with the rotational corrections although I somewhat doubt it (I'd also not quite know where to start with the calculations for those corrections).

    This wouldn't help at all when trying to detect dimensions through the Camera though.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,790

    Re: Measure Object With Camera?

    That part is Ok, I even did such movement approximation with mobile phones. But the unbelievable post simply says "I have managed to calculate height and distance using gyroscopic sensor and trigonometry".
    Otherwise yes, tracking movement, rotation, a kind of triangulation could be performed, for one point at a time (using the optical axis of the camera, so user/camera would have to look at a single point in the distance). If the thing has to handle entire image, the thing could be extended, but that would involve a lot more mathematics and calibration for the given optics, etc. The guy reported success in less than 9 hours after getting the first answer. These things simply do not fit into that time frame.

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Measure Object With Camera?

    I see what you mean. I didn't look into the details of that conversation but rather into in what way the gyro might be involved in that whole calculation process.

Similar Threads

  1. Access to Symbian camera object from QMobility
    By pixsta in forum [Archived] Qt Mobility Project
    Replies: 0
    Last Post: 2011-07-09, 19:15
  2. Camera object load fails
    By tkotti in forum Symbian
    Replies: 3
    Last Post: 2010-07-20, 12:15
  3. 3D camera following an object
    By csckid in forum Mobile Java Games
    Replies: 1
    Last Post: 2009-08-04, 10:55
  4. measure heap usage of app
    By ed_welch in forum Symbian
    Replies: 3
    Last Post: 2008-07-09, 12:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×