开发者

Perspective projection of a 3D model to a 2D plane

I'm trying to project a 3D model to a 2D plane and I found I should use the projection equation C*((R*X)+T) to do so. C, which is the camera calibration matrix is calculated as follows:

C =[f 0 px;
    0 f py;
    0 0 1];

Fir开发者_StackOverflowst, I want to ask about the focal length f used in the camera calibration matrix. Should I use it with the value in pixels or mm? If in mm how can I get it?

Second I don't really know what the px and py variables stand for I got some information about the data I'm working on bye the exifread function in MATLAB and these are the information I got:

              Sharpness: 0
               Contrast: 0
       SceneCaptureType: 0
  FocalLengthIn35mmFilm: 27
       DigitalZoomRatio: 1
           WhiteBalance: 0
           ExposureMode: 0
              SceneType: 1
             FileSource: 3
          SensingMethod: 2
        PixelYDimension: 3000
        PixelXDimension: 4000
             ColorSpace: 1
        FlashpixVersion: '0100'
            FocalLength: 4.9000
                  Flash: 1
            LightSource: 0
           MeteringMode: 4
       MaxApertureValue: 3.6150
      ExposureBiasValue: 0
          ApertureValue: 3.6150
      ShutterSpeedValue: 2.3220
 CompressedBitsPerPixel: 2.8149
ComponentsConfiguration: [1 2 3 0]
      DateTimeDigitized: '2011:06:26 16:55:08'
       DateTimeOriginal: '2011:06:26 16:55:08'
            ExifVersion: '0221'
        ISOSpeedRatings: 100
        ExposureProgram: 2
                FNumber: 3.5000
           ExposureTime: 0.2000
              Copyright: 'Copyright 2010'
       YCbCrPositioning: 2
               DateTime: '2011:06:26 16:55:08'
               Software: '  0.8913'
         ResolutionUnit: 2
            YResolution: 96
            XResolution: 96
            Orientation: 1
                  Model: 'SAMSUNG ES30/VLUU ES30'
                   Make: 'SAMSUNG'
              Thumbnail: [1x1 struct]

Do px and py refer to any of them?


px and py are the coordinates of the principal point. On an ideal camera that would be the center of the image, so you can use width/2, height/2 for a start. For actual values you should use a calibration algorithm.

f should be in pixels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜