CAHV camera model importer

What type of scripts do you need?

Moderator: byronnash

Post Reply
Redsandro
Posts: 108
Joined: June 25th, 2008, 4:55 pm

Hi,

When you use the Voodoo Camera Tracker, there's no option to export the camera to After Effects.
You can save a CAHV camera model .txt text file though, with the camera data in some way.

Is anyone willing to make a converter script, or able to tell me how I could manually convert this to After Effects camera data?

Here's part of the text file for reference:

Code: Select all

# Text export 
# created by voodoo camera tracker - www.digilab.uni-hannover.de
# Creation date: Wed Oct 29 01:54:28 2008
# The camera (one line per frame) 
#
# Description of the CAHV camera model:
# -------------
# (Cx, Cy, Cz)    : CameraPosition [mm]
# (Ax, Ay, Az)    : RotationAxis2  [unit vector]
# (Hx, Hy, Hz)    : RotationAxis0 [pel] (including FocalLength, PixelSizeX, and Principal Point offset) 
# (Vx, Vy, Vz)    : RotationAxis1 [pel] (including FocalLength, PixelSizeY, and Principal Point offset) 
# (K3, K5)        : Radialdistortion;	K3 [1/(mm)^2]	K5 [1/(mm)^4]
# (sx, sy)        : PixelSize	[mm/pel]
# (Width, Height) : ImageSize	[pel]
# -------------
# (ppx, ppy)      : Principal Point offset [pel]
# f               : Focal Length [mm]
# fov             : Horizontal Field of View [degree] = (2*atan(0.5*Width*sx/f)*180/PI;
# (H0x, H0y, H0z) : RotationAxis0 [unit vector]
# (V0x, V0y, V0z) : RotationAxis1 [unit vector]
# -------------
# (x, y)          : image coordinates [pel]
# (X, Y, Z)       : 3D coordinates [mm]
# -------------
# Projection of 3D coordinates in the camera image:
#  [ x' ] =  [ Hx Hy Hz ] [ 1 0 0 -Cx] [ X ]
#  [ y' ] =  [ Vx Vy Vz ] [ 0 1 0 -Cy] [ Y ]
#  [ z' ] =  [ Ax Ay Az ] [ 0 0 1 -Cz] [ Z ]
#                                      [ 1 ]
# or 
#  [ x' ] =  [f/sx 0    ppx] [ H0x H0y H0z ] [ 1 0 0 -Cx] [ X ]
#  [ y' ] =  [0    f/sy ppy] [ V0x V0y V0z ] [ 0 1 0 -Cy] [ Y ]
#  [ z' ] =  [0    0    1  ] [ Ax  Ay  Az  ] [ 0 0 1 -Cz] [ Z ]
#                                                         [ 1 ]
# then x = x'/z' and y = y'/z' , if the origin of the image coordinates is in the center of the image
# or x = x'/z' + 0.5*(Width-1) and y = y'/z' + 0.5*(Height-1) , if the origin of the image coordinates is in the upper left corner
# -------------
# Cx Cy Cz Ax Ay Az Hx Hy Hz Vx Vy Vz K3 K5 sx sy Width Height ppx ppy f fov H0x H0y H0z V0x V0y V0z
#
#timeindex 0
0.0000000000	0.0000000000	0.0000000000	0.0000000000	0.0000000000	1.0000000000	2598.2100321835	0.0000000000	0.0000000000	0.0000000000	3464.2713822112	0.0000000000	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	0.0000000000	0.0000000000	34.6427138221	30.9775798914	1.0000000000	0.0000000000	0.0000000000	0.0000000000	1.0000000000	0.0000000000	
#timeindex 1
0.0000000000	0.0000000000	0.0000000000	-0.0003239271	-0.0004221136	0.9999998584	2598.9095792236	0.7614210466	0.8421787558	-1.0156993727	3465.2039824899	1.4623810863	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	-0.0000000000	34.6520443992	30.9696390414	0.9999999046	0.0002929771	0.0003240508	-0.0002931138	0.9999998680	0.0004220187	
#timeindex 2
0.0000000000	0.0000000000	0.0000000000	-0.0004299442	-0.0008766045	0.9999995234	2599.1292220425	0.5326568224	1.1179479515	-0.7115136434	3465.4959546903	3.0375647408	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	0.0000000000	34.6549735897	30.9671469533	0.9999998865	0.0002049366	0.0004301240	-0.0002053136	0.9999995948	0.0008765162	
#timeindex 3
0.0000000000	0.0000000000	0.0000000000	-0.0004750116	-0.0013098798	0.9999990293	2598.6175083110	0.7453547710	1.2353510203	-0.9959604552	3464.8121014285	4.5380187129	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	0.0000000000	0.0000000000	34.6481521639	30.9729510714	0.9999998459	0.0002868274	0.0004753877	-0.0002874498	0.9999991010	0.0013097434	
#timeindex 4
0.0000000000	0.0000000000	0.0000000000	-0.0005060018	-0.0014390733	0.9999988365	2598.3696118728	1.4532194490	1.3168725633	-1.9401455953	3464.4810121722	4.9846660372	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	0.0000000000	34.6448514137	30.9757603291	0.9999997152	0.0005592811	0.0005068071	-0.0005600098	0.9999988081	0.0014387898	
#timeindex 5
0.0000000000	0.0000000000	0.0000000000	-0.0005134944	-0.0012806081	0.9999990482	2597.8479156222	3.2567809605	1.3381523782	-4.3446444842	3463.7861806190	4.4335257765	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	0.0000000000	0.0000000000	34.6379174275	30.9816634413	0.9999990815	0.0012536446	0.0005150999	-0.0012543030	0.9999983942	0.0012799631	
#timeindex 6
0.0000000000	0.0000000000	0.0000000000	-0.0002410540	-0.0005392674	0.9999998255	2596.7349621320	5.2245566199	0.6287709556	-6.9665089625	3462.3042251219	1.8654287680	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	0.0000000000	34.6231173631	30.9942705286	0.9999979467	0.0020119673	0.0002421386	-0.0020120976	0.9999978306	0.0005387813	
#timeindex 7
0.0000000000	0.0000000000	0.0000000000	0.0001176323	0.0007942266	0.9999996777	2597.0093638007	5.2149477396	-0.3096342369	-6.9535719206	3462.6694275238	-2.7493270354	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	0.0000000000	-0.0000000000	34.6267750090	30.9911539178	0.9999979767	0.0020080548	-0.0001192270	-0.0020081489	0.9999976685	-0.0007939888	
#timeindex 8
0.0000000000	0.0000000000	0.0000000000	0.0004187563	0.0021012711	0.9999977046	2595.8238511436	5.1718287224	-1.0978875841	-6.8988145006	3461.0824840237	-7.2698003687	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	0.0000000000	34.6109699443	31.0046255031	0.9999979258	0.0019923609	-0.0004229429	-0.0019932451	0.9999958076	-0.0021004324	
#timeindex 9
0.0000000000	0.0000000000	0.0000000000	0.0006481337	0.0033381393	0.9999942184	2596.4896045530	7.4986987691	-1.7079140975	-10.0057838782	3461.9589444612	-11.5500830093	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	-0.0000000000	34.6199267089	30.9969897240	0.9999956134	0.0028880015	-0.0006577753	-0.0028901805	0.9999902581	-0.0033362529	
#timeindex 10
0.0000000000	0.0000000000	0.0000000000	0.0005522188	0.0035827260	0.9999934295	2597.5426997855	13.0986449690	-1.4813504794	-17.4717778907	3463.3599426083	-12.3987028252	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	0.0000000000	-0.0000000000	34.6342620578	30.9847762516	0.9999871232	0.0050426414	-0.0005702818	-0.0050446514	0.9999808677	-0.0035798952	
#timeindex 11
0.0000000000	0.0000000000	0.0000000000	0.0007491871	0.0032955711	0.9999942889	2597.0250719784	12.8241751634	-1.9879320003	-17.1074949579	3462.6736493849	-11.3987354957	0.0000000000	0.0000000000	0.0133333000	0.0100000000	1440	1080	-0.0000000000	0.0000000000	34.6273467070	30.9906668400	0.9999875152	0.0049379635	-0.0007654555	-0.0049404579	0.9999823777	-0.0032918305	
etcetera
avi + m2t -> Vdub + DGIndex -> AE CS3 -> x264 -> Hell On Earth :mrgreen:
Post Reply