aboutsummaryrefslogtreecommitdiffstats
path: root/include/volt/volt.h
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2023-10-29 13:31:00 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2023-10-29 13:31:00 -0400
commit39f7f4047e57fc7e7e275e52657f47d3d4bb6e2a (patch)
tree06368943ff8e913140c7872bfa385ece9152a88e /include/volt/volt.h
parente718d7228983a3d033523fbf0d5fc06f37bca603 (diff)
Zero-out unused/invalid fields in g_nvdebug_device on Tegra devices
Previously, unloading the module could cause a segfault on Tegra, as pcid would be unitilized and possibly non-zero, causing us to attempt PCIe-device-style deinitialization on a non-PCEe device.
Diffstat (limited to 'include/volt/volt.h')
0 files changed, 0 insertions, 0 deletions
' href='#n32'>32 33 34 35 36



































                                                                   

%%% Extraction of the final intrinsic and extrinsic paramaters:


fc = solution(1:2);
kc = solution(3:6);
cc = solution(6*n_ima + 4 +3:6*n_ima + 5 +3);

% Calibration matrix:
	
KK = [fc(1) 0 cc(1);0 fc(2) cc(2); 0 0 1];
inv_KK = inv(KK);	

% Extract the extrinsic paramters, and recomputer the collineations

for kk = 1:n_ima,
   
   omckk = solution(4+6*(kk-1) + 3:6*kk + 3);
   
   Tckk = solution(6*kk+1 + 3:6*kk+3 + 3);
   
   Rckk = rodrigues(omckk);
   
   Hlkk = KK * [Rckk(:,1) Rckk(:,2) Tckk];
   
   Hlkk = Hlkk / Hlkk(3,3);
   
   eval(['omc_' num2str(kk) ' = omckk;']);
   eval(['Rc_' num2str(kk) ' = Rckk;']);
	eval(['Tc_' num2str(kk) ' = Tckk;']);
   
   eval(['Hl_' num2str(kk) '=Hlkk;']);
   
end;