Sorry for my question.I have done quite a bit research but unfortunately after over 50 hour i am not able to get any of the working code.I want to develop https://play.google.com/store/apps/details?id=kr.aboy.measure this type of functionality.Not the exact one.I just need to calculate distance between my camera and one object.also i have to find the width and length of a wall in a room.Its very important for me. It would be nice if anybody could point me in the right direction.
-
"working source code" - this isn't a "haz the codes" site. – duffymo Aug 29 '13 at 12:57
-
possible duplicate of [How to measure height, width and distance of object using camera?](http://stackoverflow.com/questions/8698889/how-to-measure-height-width-and-distance-of-object-using-camera) – g00dy Aug 29 '13 at 12:58
-
I meant the algorithm duffymo – Chiradeep Aug 29 '13 at 12:58
-
Dear g00dy..I just want an algorithm.or the pseudo code.Please understand.All the stuffs are available are theoretical based.I need sample codes.Please understand – Chiradeep Aug 29 '13 at 12:59
-
As mentioned here: http://stackoverflow.com/a/9061448/2274885 : a reference object of which you know the exact dimensions is very helpful with this kind of thing. – M.Bennett Aug 29 '13 at 13:00
-
Dear M.Bennett..Again to mentioned ur article..For that concept their is problem to find the h height.As it is variable.There is no way that i can assume that height.So,this theory is also not working – Chiradeep Aug 29 '13 at 13:02
-
@FunLove, Have you solved your problem.I am facing the same issue.Please help me.Thanks in advance.. (+1) – Jagdish Jun 20 '14 at 06:59
1 Answers
It is impossible to measure that accurate, but I think that articles can help you : Determine Android Device's Camera Height and Width, How to measure height, width and distance of object using camera?, Is it possible to measure distance to object with camera?, how can we measure distance between object and android phone camera .
Citation from http://androiddev.orkitra.com/?p=67531 :
It isn’t an easy task. You may need to combine more than 1 image to do this. Or you need to know physical dimensions of the object you’re taking a picture of. I suggest looking at this library (recently also available for Android, although I haven’t used it for it). You’ll be particularly interested in 3d reconstruction, I presume. There are some tutorials to get you started with this. Good luck.
-
Thanks for your view Ty221.I have already gone through with this.The First article is not useful.As i want only the object distance from my camera to the object.Others are theoretical.If u can help me regarding the pseudo code it will be so much helpful for me – Chiradeep Aug 29 '13 at 13:04
-
I am stuck in my progress..If you guide me it will be very helpful for me.its quite complex using openCV to find the distance.I have come to a solution and that is to find the focal length and angle of elevation.I am assuming my device camera is typically 5t high.Now i am stuck to find the angle of elevation and my device camera focul length :( – Chiradeep Aug 30 '13 at 11:37