Hi folks,
I got stuck a few days ago on how to get the 2D-Image-Coordinates from 3D-World-Cordinates.
I'll like to project the 3D points to the image.
So far, I've used the standard formular from computer vision's opencv community.
s(x,y) = K[R|T]X , where s is just a scale which would be removed by normalization.
K ist made up of fx, fy, and cx, cy int the standard constellation.
[R|T] are just the 16 values from the transformation tag within the xml file.
When I plug in the values from the xml file, since these seems to be self explanatory, I get completely weird and wrong results . I really must be doing something wrong ?
Below is a section of my xml file after an alignment using Photoscan.
Would be greatful for any feedback on what can be done or what am doing wrong.
Thanks in advance.
William
<?xml version="1.0" encoding="UTF-8"?>
<document version="1.1.0">
<chunk>
<sensors>
<sensor id="0" label="Canon EOS 350D DIGITAL (18 mm)" type="frame">
<resolution width="3456" height="2304"/>
<property name="pixel_width" value="6.4198206018518476e-03"/>
<property name="pixel_height" value="6.4198206018518476e-03"/>
<property name="focal_length" value="1.8000000000000000e+01"/>
<property name="fixed" value="false"/>
<calibration type="frame" class="adjusted">
<resolution width="3456" height="2304"/>
<fx>2.8513916770064407e+03</fx>
<fy>2.8513916770064407e+03</fy>
<cx>1.7142977803506899e+03</cx>
<cy>1.1750826746576211e+03</cy>
<k1>-1.6031160926301238e-01</k1>
<k2>1.4987646942943705e-01</k2>
<k3>-2.4719484671678366e-02</k3>
</calibration>
</sensor>
</sensors>
<cameras>
<camera id="0" label="IMG_8722.JPG" sensor_id="0" enabled="true">
<transform>9.9227184007569458e-01 -1.2185523303064348e-01 2.3407212047629491e-02 -2.2351721513990133e+00 1.0925472409197114e-01 9.4743195751412834e-01 3.0072594025879151e-01 -1.2025190386881018e+01 -5.8821770258828301e-02 -2.9584453360505847e-01 9.5342331169298722e-01 -4.6528962969246628e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00</transform>
<orientation>6</orientation>
</camera>
<camera id="1" label="IMG_8723.JPG" sensor_id="0" enabled="true">
<transform>9.8995202075345468e-01 -1.4018894610390745e-01 -1.8494755916944709e-02 -2.0944413279691725e+00 1.3781084771662525e-01 9.2721466653058471e-01 3.4825440761345960e-01 -1.1349541060350331e+01 -3.1672809439277042e-02 -3.4730393254446790e-01 9.3721759030727281e-01 -4.3615241444329396e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000000000e+00</transform>
<orientation>6</orientation>
</camera>