如何使用图像 Exif 元数据从 iPhone 相机获取对象距离? [英] how to get Distance of Object from iPhone camera using image Exif meta data?

查看:19
本文介绍了如何使用图像 Exif 元数据从 iPhone 相机获取对象距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<小时>

编辑:抱歉编辑晚了,没有两个参数你无法计算,所以首先需要填充用户相机距离地面的高度.

<小时>

我检查了许多解决方案,但没有一个有用!

我知道工作距离=(传感器高度+主体高度)*焦距/传感器高度

到物体的距离(mm)=焦距(mm)*物体的实际高度(mm)*图像高度(像素)----------------------------------------------------------------物体高度(像素)* 传感器高度(毫米)

我想远离这个:

这个应用程序是如何工作的???欢迎所有帮助

解决方案

@iphonemaclover.正如许多人所指出的那样,纯粹使用三角函数来计算这一点的信息不足.但是,根据您需要的准确性,或者您尝试测量的内容以及您可以期望从 iphone 恢复的其他数据和/或您愿意做出一些假设,有可能做出一些假设侵入.

a) +1 给 Martin R,如果您假设地球是平坦的,用户可以更新手机高度(根据您引用的应用程序)以进行校准,可以恢复音高信息并知道地面上的某个点在您的对象的基础上,这就是简单的触发.一旦估算出距离并假设您正在测量的物体接近垂直(或以已知角度放置),那么也可以计算其高度.

b) 您的 exif 文件包含人脸区域信息.如果您对人感兴趣并且乐于假设他们是成年人,那么您可以使用您已经概述的方法使用平均头部大小假设来估计距离.

c)如果您可以恢复一系列图像和相机位置并且相机/物体位置不同,那么我相信可以使用投影几何恢复 3d 信息.


Edit: Sorry for late Edit, Without two parameter you cannot calculate it, So first need to fill user Camera height from ground.


I have check a number of solutions but none of them helpful!

I know that Working Distance = (Sensor Height + Subject Height) * Focal Length / Sensor Height

and

distance to object (mm) = focal length (mm) * real height of the object (mm) * image height (pixels)
                          ----------------------------------------------------------------
                                object height (pixels) * sensor height (mm)

And I want to get distance from this:

Image Formation by Lenses and the Eye

Hello I get the following info using image Exif ALAssetsLibrary

And I got following meta data :

Save image metadata.
 {
    DPIHeight = 72;
    DPIWidth = 72;
    FaceRegions =     {
        Regions =         {
            HeightAppliedTo = 2448;
            RegionList =             (
                                {
                    AngleInfoRoll = 270;
                    AngleInfoYaw = 0;
                    ConfidenceLevel = 376;
                    FaceID = 1;
                    Height = "0.1413399";
                    Timestamp = 5996166864910;
                    Type = Face;
                    Width = "0.1060049";
                    X = "0.3560049";
                    Y = "0.4746732";
                }
            );
            WidthAppliedTo = 3264;
        };
    };
    Orientation = 6;
    "{Exif}" =     {
        ApertureValue = "2.526068811667587";
        BrightnessValue = "1.291629806962232";
        ColorSpace = 1;
        DateTimeDigitized = "2014:03:25 15:43:36";
        DateTimeOriginal = "2014:03:25 15:43:36";
        ExposureMode = 0;
        ExposureProgram = 2;
        ExposureTime = "0.05";
        FNumber = "2.4";
        Flash = 24;
        FocalLenIn35mmFilm = 33;
        FocalLength = "4.12";
        ISOSpeedRatings =         (
            160
        );
        LensMake = Apple;
        LensModel = "iPhone 5 back camera 4.12mm f/2.4";
        LensSpecification =         (
            "4.12",
            "4.12",
            "2.4",
            "2.4"
        );
        MeteringMode = 5;
        PixelXDimension = 3264;
        PixelYDimension = 2448;
        SceneType = 1;
        SensingMethod = 2;
        ShutterSpeedValue = "4.321956949076723";
        SubjectArea =         (
            1631,
            1223,
            1795,
            1077
        );
        SubsecTimeDigitized = 261;
        SubsecTimeOriginal = 261;
        UserComment = hoge;
        WhiteBalance = 0;
    };
    "{GPS}" =     {
        Altitude = "196.008";
        AltitudeRef = 0;
        DateStamp = "2014:03:25";
        Latitude = "28.61772";
        LatitudeRef = N;
        Longitude = "77.38891";
        LongitudeRef = E;
        TimeStamp = "10:13:37.439000";
    };
    "{MakerApple}" =     {
        1 = 0;
        3 =         {
            epoch = 0;
            flags = 1;
            timescale = 1000000000;
            value = 249840592070541;
        };
        4 = 0;
        5 = 179;
        6 = 139;
        7 = 1;
    };
    "{TIFF}" =     {
        DateTime = "2014:03:25 15:43:36";
        Make = Apple;
        Model = "iPhone 5";
        Software = "7.0.6";
        XResolution = 72;
        YResolution = 72;
    };
}

I need to calculate the distance of the object from the camera, using the above details; using iphone4s,iphone5, or iphone5s. Is it possible?

Modified Need to know formula used by this app any idea:

Need to know any method

http://www.youtube.com/watch?v=eCStIagorx8

how this App working ??? All Help are welcome

解决方案

@iphonemaclover. As many people have pointed out there's insufficient information to calculate this purely using trigonometry. However, depending on how accurate you need to be, or what it is you're trying to measure and other data you can expect to recover from an iphone and/or you're willing to make some assumptions, it is possible to make some inroads.

a) +1 to Martin R, if you assume a flat earth, a phone height (which as per the app you quoted) a user could update for calibration purposes, can recover pitch information and know where a point on the ground at the base of your object is then this is simple trig. Once there's a estimate for the distance and assuming the thing you're measuring is close to vertical (or sits at a known angle) then its height can also be calculated.

b) Your exif file contains face region information. If you're interested in people and are happy to make an assumption that they're an adult then you could use an average head size assumption to estimate distance using the method you've outlined already.

c) If you can recover a series of images and camera positions and the camera / object positions vary then I believe that 3d information can be recovered using projective geometry.

这篇关于如何使用图像 Exif 元数据从 iPhone 相机获取对象距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆