Log in or register to post comments

Distance to camera discrepancies from target across different de

October 5, 2015 - 9:47pm #1

Hi all,

I doubt this is specific to Unity but I'm using the Unity extension.  I'm building an app that requires the physical distance between the camera and a given target. I've been finding that firstly the distance returned is different to the actual distance (after scaling given the targets physical size), and secondly the distance returned is different across different devices.  I'm being careful to make sure that the physical position of the camera lens is in the same physical location when measuring different devices - and directly in "front" of the target, the most trivial of examples.  This person also seemed to have the same issues (with no obvious resolution) using Android devices.

It's the discrepancy across devices that most disturbs me as it looks like I'll have to introduce a calibration step into the app,  is this the case? Surely this isn't the first time this has been raised? 

My square target is 15cm and the camera is ~1m away.  

  • iphone 6 measures ~1m 20
  • iPad Air 2 measures ~1m 16
  • iPad 2 measures ~99.5

The significant error (on the retina devices) seems to be "roughly constant" over distance i.e. when measuring 50cm away, the computed distance is ~60cm for iPhone 6, approximately the same error.  So I figured that could introduce a scaling factor and this would be an ugly fix, but then I measure with other devices and get a different error.  Interestingly, when I measure the distance between 2 markers that are roughly the same distance from the camera, the distance between them is physically fairly accurate (although this has not been exhaustively tested).

The computed distance is as following:

			Vector3 vToCamera = mImageTarget.transform.position - mCamera.transform.position;
			float distance = vToCamera.magnitude;

Hopefully I'm just missing something simple?  I didn't think I would have to be concerned with large inconsistencies across devices.

Any help would be greatly appreciated.

Scott

 

Distance to camera discrepancies from target across different de

October 21, 2015 - 12:03am #10

Yes, we have checked other devices as well, including iPhone 6Plus, iPad Air.

Distance to camera discrepancies from target across different de

October 18, 2015 - 2:34pm #9

Thanks for that.  

I will check these new profiles out today.

Hopefully you guys checked out all the newer retina devices in the process?  iPhone 6s, iPhone 6 Plus, iPad Air etc

Thanks

Scott

Distance to camera discrepancies from target across different de

October 16, 2015 - 12:37am #8

The iPad 4 calibration profile has also been updated.

Distance to camera discrepancies from target across different de

October 14, 2015 - 12:28am #7

The iPhone 6 and iPad Air 2 calibration data have been updated;

could you try uninstall and reinstall the App, enabling internet connection and repeat your distance tests ?

 

 

Distance to camera discrepancies from target across different de

October 13, 2015 - 4:02pm #6

I realise there's a lot going on at the moment but how are you guys going with this?  Wouldn't you guys consider releasing a tool to create custom camera profiles as you have for eyewear?

As an addition to the innacurate hardware list, add the iPad 4. Simplistic maybe, but the common thread looks like retina doesn't it?

Thanks

Scott

 

 

 

 

Distance to camera discrepancies from target across different de

October 9, 2015 - 7:10am #5

Thanks for the additional info, we are currently working on this, I'll post back as soon as I have an update.

Distance to camera discrepancies from target across different de

October 7, 2015 - 9:31pm #4

Thanks for getting back to me.

Changing mode does not appear to make any (discernable) difference.  The error is quite large and stays large when you switch mode.

What I can tell you is that the error also exists for my Webcam profile too.

OSX 10.11, Unity 5.2.1, Vuforia 5.05.

Late 2012 iMac.

 

 

 

 

Distance to camera discrepancies from target across different de

October 7, 2015 - 12:29am #3

We're going to look at this.

Have you done the same tests with different camera modes 

MODE_DEFAULT

MODE_OPTIMIZE_SPEED

MODE_OPTIMIZE_QUALITY

?

It would be good to check all of the modes above, so to get the full picture in your tests.

 

Distance to camera discrepancies from target across different de

October 6, 2015 - 3:04pm #2

Well I guess I put torward a theory to my own question.

It's looking like the camera profiles for newer devices either don't exist (and defaulting to using a profile for a similar device) or they're wrong (which seems unlikely).

Any comment from Vuforia?

I've been looking at how to create my own custom camera profile, which seems to be possible for eyewear but not for a normal mobile device??

 

 

 

Log in or register to post comments