matlab - Perspective projection of a 3D model to a 2D plane -
i'm trying project 3d model 2d plane , found should use projection equation c*((r*x)+t) so. c, camera calibration matrix calculated follows:
c =[f 0 px; 0 f py; 0 0 1]; first, want ask focal length f used in camera calibration matrix. should use value in pixels or mm? if in mm how can it?
second don't know px , py variables stand got information data i'm working on bye exifread function in matlab , these information 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 , py refer of them?
px , py coordinates of principal point. on ideal camera center of image, can use width/2, height/2 start. actual values should use calibration algorithm.
f should in pixels.
Comments
Post a Comment