亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? go_calib_optim_iter_weak.m

?? matlab的標(biāo)定工具箱
?? M
?? 第 1 頁 / 共 2 頁
字號:
%%% WARNING!!! This code is not in working condition yet.
%%% AS A RESULT, IT IS NOT SUPPORTED!!!
%%% -Jean-Yves Bouguet

%go_calib_optim_iter_weak
%
%Main calibration function. Computes the intrinsic andextrinsic parameters
%for the weak perspective camera model
%Runs as a script.
%
%INPUT: x_1,x_2,x_3,...: Feature locations on the images
%       X_1,X_2,X_3,...: Corresponding grid coordinates
%
%OUTPUT: fc: Camera focal length
%        cc: Principal point coordinates
%        alpha_c: Skew coefficient
%        kc: Distortion coefficients
%        KK: The camera matrix (containing fc and cc)
%        omc_1,omc_2,omc_3,...: 3D rotation vectors attached to the grid positions in space
%        Tc_1,Tc_2,Tc_3,...: 3D translation vectors attached to the grid positions in space
%        Rc_1,Rc_2,Rc_3,...: 3D rotation matrices corresponding to the omc vectors
%
%Method: Minimizes the pixel reprojection error in the least squares sense over the intrinsic
%        camera parameters, and the extrinsic parameters (3D locations of the grids in space)
%
%Note: If the intrinsic camera parameters (fc, cc, kc) do not exist before, they are initialized through
%      the function init_intrinsic_param.m. Otherwise, the variables in memory are used as initial guesses.
%
%Note: The row vector active_images consists of zeros and ones. To deactivate an image, set the
%      corresponding entry in the active_images vector to zero.
%
%VERY IMPORTANT: This function works for 2D and 3D calibration rigs, except for init_intrinsic_param.m
%that is so far implemented to work only with 2D rigs.
%In the future, a more general function will be there.
%For now, if using a 3D calibration rig, quick_init is set to 1 for an easy initialization of the focal length



%%% Little modifications for weak perspective model:
center_optim = 0; % No center estimation for weak perspective model
%est_dist = zeros(5,1); % No distortion for weak perspective model
%est_alpha = 0; % No skew for weak perspective model



if ~exist('desactivated_images'),
    desactivated_images = [];
end;

if ~exist('est_aspect_ratio'),
    est_aspect_ratio = 1;
end;

if ~exist('est_fc');
    est_fc = [1;1]; % Set to zero if you do not want to estimate the focal length (it may be useful! believe it or not!)
end;

if ~exist('recompute_extrinsic'),
    recompute_extrinsic = 1; % Set this variable to 0 in case you do not want to recompute the extrinsic parameters
    % at each iterstion.
end;


if ~exist('MaxIter'),
    MaxIter = 30; % Maximum number of iterations in the gradient descent
end;

if ~exist('check_cond'),
    check_cond = 1; % Set this variable to 0 in case you don't want to extract view dynamically
end;

if ~exist('center_optim'),
    center_optim = 1; %%% Set this variable to 0 if your do not want to estimate the principal point
end;

if exist('est_dist'),
    if length(est_dist) == 4,
        est_dist = [est_dist ; 0];
    end;
end;

if ~exist('est_dist'),
    est_dist = [1;1;1;1;0];
end;

if ~exist('est_alpha'),
    est_alpha = 0; % by default, do not estimate skew
end;


% Little fix in case of stupid values in the binary variables:
center_optim = double(~~center_optim);
est_alpha = double(~~est_alpha);
est_dist = double(~~est_dist);
est_fc = double(~~est_fc);
est_aspect_ratio = double(~~est_aspect_ratio);



fprintf(1,'\n');

if ~exist('nx')&~exist('ny'),
    fprintf(1,'WARNING: No image size (nx,ny) available. Setting nx=640 and ny=480. If these are not the right values, change values manually.\n');
    nx = 640;
    ny = 480;
end;


check_active_images;


quick_init = 0; % Set to 1 for using a quick init (necessary when using 3D rigs)


% Check 3D-ness of the calibration rig:
rig3D = 0;
for kk = ind_active,
    eval(['X_kk = X_' num2str(kk) ';']);
    if is3D(X_kk),
        rig3D = 1;
    end;
end;


if center_optim & (length(ind_active) < 2) & ~rig3D,
    fprintf(1,'WARNING: Principal point rejected from the optimization when using one image and planar rig (center_optim = 1).\n');
    center_optim = 0; %%% when using a single image, please, no principal point estimation!!!
    est_alpha = 0;
end;

if ~exist('dont_ask'),
    dont_ask = 0;
end;

if center_optim & (length(ind_active) < 5) & ~rig3D,
    fprintf(1,'WARNING: The principal point estimation may be unreliable (using less than 5 images for calibration).\n');
    %if ~dont_ask,
    %   quest = input('Are you sure you want to keep the principal point in the optimization process? ([]=yes, other=no) ');
    %   center_optim = isempty(quest);
    %end;
end;


% A quick fix for solving conflict
if ~isequal(est_fc,[1;1]),
    est_aspect_ratio=1;
end;
if ~est_aspect_ratio,    est_fc=[1;1];
end;


if ~est_aspect_ratio,
    fprintf(1,'Aspect ratio not optimized (est_aspect_ratio = 0) -> fc(1)=fc(2). Set est_aspect_ratio to 1 for estimating aspect ratio.\n');
else
    if isequal(est_fc,[1;1]),
        fprintf(1,'Aspect ratio optimized (est_aspect_ratio = 1) -> both components of fc are estimated (DEFAULT).\n');
    end;
end;

if ~isequal(est_fc,[1;1]),
    if isequal(est_fc,[1;0]),
        fprintf(1,'The first component of focal (fc(1)) is estimated, but not the second one (est_fc=[1;0])\n');
    else
        if isequal(est_fc,[0;1]),
            fprintf(1,'The second component of focal (fc(1)) is estimated, but not the first one (est_fc=[0;1])\n');
        else
            fprintf(1,'The focal vector fc is not optimized (est_fc=[0;0])\n');
        end;
    end;
end;


if ~center_optim, % In the case where the principal point is not estimated, keep it at the center of the image
    fprintf(1,'Principal point not optimized (center_optim=0). Default state for weak perspective model');
    if ~exist('cc'),
        fprintf(1,'It is kept at the center of the image.\n');
        cc = [(nx-1)/2;(ny-1)/2];
    else
        fprintf(1,'Note: to set it in the middle of the image, clear variable cc, and run calibration again.\n');
    end;
else
    fprintf(1,'Principal point optimized (center_optim=1) - (DEFAULT). To reject principal point, set center_optim=0\n');
end;


if ~center_optim & (est_alpha),
    fprintf(1,'WARNING: Since there is no principal point estimation (center_optim=0), no skew estimation (est_alpha = 0)\n');
    est_alpha = 0;  
end;

if ~est_alpha,
    fprintf(1,'Skew not optimized (est_alpha=0) - (DEFAULT)\n');
    alpha_c = 0;
else
    fprintf(1,'Skew optimized (est_alpha=1). To disable skew estimation, set est_alpha=0.\n');
end;


if ~prod(double(est_dist)),
    fprintf(1,'Distortion not fully estimated (defined by the variable est_dist):\n');
    if ~est_dist(1),
        fprintf(1,'     Second order distortion not estimated (est_dist(1)=0) - (DEFAULT for weak perspective model) . \n');
    end;
    if ~est_dist(2),
        fprintf(1,'     Fourth order distortion not estimated (est_dist(2)=0) - (DEFAULT for weak perspective model) .\n');
    end;
    if ~est_dist(5),
        fprintf(1,'     Sixth order distortion not estimated (est_dist(5)=0) - (DEFAULT for weak perspective model) .\n');
    end;
    if ~prod(double(est_dist(3:4))),
        fprintf(1,'     Tangential distortion not estimated (est_dist(3:4)~=[1;1]) - (DEFAULT for weak perspective model) .\n');
    end;
end;


% Check 3D-ness of the calibration rig:
rig3D = 0;
for kk = ind_active,
    eval(['X_kk = X_' num2str(kk) ';']);
    if is3D(X_kk),
        rig3D = 1;
    end;
end;

% If the rig is 3D, then no choice: the only valid initialization is manual!
if rig3D,
    quick_init = 1;
end;



alpha_smooth = 1; % set alpha_smooth = 1; for steepest gradient descent


% Conditioning threshold for view rejection
thresh_cond = 1e6;



%% Initialization of the intrinsic parameters (if necessary)

if ~exist('cc'),
    fprintf(1,'Initialization of the principal point at the center of the image.\n');
    cc = [(nx-1)/2;(ny-1)/2];
    alpha_smooth = 0.4; % slow convergence
end;


if exist('kc'),
    if length(kc) == 4;
        fprintf(1,'Adding a new distortion coefficient to kc -> radial distortion model up to the 6th degree');
        kc = [kc;0];
    end;
end;


if ~exist('kc'),
    fprintf(1,'Initialization of the image distortion to zero.\n');
    kc = zeros(5,1);
    alpha_smooth = 0.4; % slow convergence
end;

if ~exist('alpha_c'),
    fprintf(1,'Initialization of the image skew to zero.\n');
    alpha_c = 0;
    alpha_smooth = 0.4; % slow convergence
end;

if ~exist('fc')& quick_init,
    FOV_angle = 35; % Initial camera field of view in degrees
    fprintf(1,['Initialization of the focal length to a FOV of ' num2str(FOV_angle) ' degrees.\n']);
    fc = (nx/2)/tan(pi*FOV_angle/360) * ones(2,1);
    est_fc = [1;1];
    alpha_smooth = 0.4; % slow 
end;


if ~exist('fc'),
    % Initialization of the intrinsic parameters:
    fprintf(1,'Initialization of the intrinsic parameters using the vanishing points of planar patterns.\n')
    init_intrinsic_param; % The right way to go (if quick_init is not active)!
    alpha_smooth = 0.4; % slow convergence
    est_fc = [1;1];
end;


if ~est_aspect_ratio,
    fc(1) = (fc(1)+fc(2))/2;
    fc(2) = fc(1);
end;

if ~prod(double(est_dist)),
    % If no distortion estimated, set to zero the variables that are not estimated
    kc = kc .* est_dist;
end;


if ~prod(double(est_fc)),
    fprintf(1,'Warning: The focal length is not fully estimated (est_fc ~= [1;1])\n');
end;


%%% Initialization of the extrinsic parameters for global minimization:
comp_ext_calib;



%%% Initialization of the global parameter vector:

init_param = [fc;cc;alpha_c;kc;zeros(5,1)]; 

for kk = 1:n_ima,
    eval(['omckk = omc_' num2str(kk) ';']);
    eval(['Tckk = Tc_' num2str(kk) ';']);
    init_param = [init_param; omckk ; Tckk];    
end;


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕电影一区| 成人黄色一级视频| 精品国产亚洲一区二区三区在线观看| 首页国产欧美日韩丝袜| 欧美精品视频www在线观看| 日产欧产美韩系列久久99| 91麻豆精品国产综合久久久久久| 久久不见久久见免费视频1| 久久人人超碰精品| 99精品热视频| 日韩二区三区四区| 久久久久国产成人精品亚洲午夜| 成人18视频日本| 亚洲一区二区综合| 精品国产麻豆免费人成网站| eeuss鲁一区二区三区| 亚洲电影激情视频网站| 91精品国产综合久久福利| 精品在线一区二区| 综合欧美一区二区三区| 欧美一级黄色大片| www.综合网.com| 日韩av不卡在线观看| 国产精品麻豆网站| 欧美精品v国产精品v日韩精品| 国产综合色产在线精品 | 久久久夜色精品亚洲| 成人激情电影免费在线观看| 午夜视频一区二区三区| 国产欧美一区二区精品忘忧草| 在线免费观看成人短视频| 免费观看91视频大全| ●精品国产综合乱码久久久久 | 精品无人码麻豆乱码1区2区| 中文字幕制服丝袜一区二区三区 | 国产成人鲁色资源国产91色综| 亚洲免费av在线| 亚洲精品在线观看网站| 一本到不卡免费一区二区| 狠狠色丁香婷婷综合久久片| 亚洲伊人伊色伊影伊综合网| 国产天堂亚洲国产碰碰| 欧美精品一级二级三级| 99久久久精品免费观看国产蜜| 另类欧美日韩国产在线| 亚洲中国最大av网站| 国产精品久久久久久久久果冻传媒| 日韩一区二区精品在线观看| 99re这里都是精品| 国产高清精品在线| 精品在线免费视频| 日日噜噜夜夜狠狠视频欧美人| 最新不卡av在线| 国产精品丝袜久久久久久app| 精品国产在天天线2019| 3atv一区二区三区| 欧美日韩国产免费一区二区| 色综合一区二区三区| 成人激情电影免费在线观看| 国产电影一区在线| 国产在线视频一区二区| 美女视频黄免费的久久| 视频一区二区不卡| 亚洲第一福利视频在线| 亚洲资源中文字幕| 亚洲国产精品人人做人人爽| 亚洲精品成人在线| 一区二区三区四区乱视频| 亚洲日本中文字幕区| 1024国产精品| 亚洲一区在线观看免费观看电影高清| 日韩美女久久久| 亚洲免费成人av| 亚洲最新视频在线观看| 亚洲精品国产一区二区精华液| 亚洲欧洲日韩综合一区二区| 国产精品福利一区二区| 亚洲欧美日韩小说| 一区二区三区欧美日韩| 亚洲综合久久久久| 午夜精品久久久| 日韩av电影免费观看高清完整版在线观看| 偷窥少妇高潮呻吟av久久免费| 五月激情丁香一区二区三区| 青青草97国产精品免费观看无弹窗版| 亚洲aaa精品| 麻豆成人av在线| 经典一区二区三区| 粉嫩一区二区三区在线看| 99精品久久只有精品| 在线日韩国产精品| 91麻豆精品久久久久蜜臀 | 欧美日韩一区二区三区高清| 欧美日本国产一区| 欧美成人猛片aaaaaaa| 2欧美一区二区三区在线观看视频| 久久日韩粉嫩一区二区三区 | 欧美性猛交xxxxxxxx| 日韩欧美一级二级三级| 久久久不卡影院| 亚洲黄色在线视频| 久久精品噜噜噜成人88aⅴ| 国产一区在线不卡| 91首页免费视频| 91精品一区二区三区久久久久久| 精品99999| 亚洲美女在线国产| 蜜臀精品久久久久久蜜臀 | 国产一区美女在线| 91香蕉国产在线观看软件| 欧美日韩一区二区三区视频| 久久久久久久性| 亚洲国产精品久久久久婷婷884 | 日韩精品中文字幕一区| 国产精品女主播av| 奇米精品一区二区三区四区| 成人国产精品免费观看动漫| 欧美在线观看18| 久久久久久久久久久黄色| 亚洲欧美日韩一区二区 | 在线观看国产日韩| 精品少妇一区二区三区在线视频| 国产精品成人网| 日韩av一二三| 99精品欧美一区二区蜜桃免费| 日韩午夜激情电影| 亚洲美女免费在线| 国产综合久久久久久鬼色| 欧美羞羞免费网站| 国产精品无码永久免费888| 日本伊人午夜精品| 色播五月激情综合网| 在线影院国内精品| 在线观看国产一区二区| 久久久久国产精品厨房| 午夜精品免费在线| 91欧美一区二区| 久久蜜臀中文字幕| 日韩成人伦理电影在线观看| 色综合天天综合网国产成人综合天| 精品国产青草久久久久福利| 亚洲午夜免费视频| 99re这里都是精品| 亚洲国产精品v| 国产麻豆精品theporn| 日韩美女视频在线| 日韩av电影天堂| 欧美日韩精品欧美日韩精品一| 亚洲欧洲性图库| 成人三级在线视频| 久久婷婷综合激情| 狠狠色综合色综合网络| 91精品国产黑色紧身裤美女| 亚洲成av人片一区二区| 91久久精品一区二区三| 亚洲视频香蕉人妖| 成人福利在线看| 国产精品美日韩| 成人av小说网| 国产精品二区一区二区aⅴ污介绍| 国产高清久久久久| 国产精品你懂的在线| 不卡一区在线观看| 成人免费在线播放视频| www.日韩大片| 亚洲视频1区2区| 91精品办公室少妇高潮对白| 亚洲精品欧美在线| 欧美影院精品一区| 视频一区视频二区中文| 欧美一区二区三区四区五区 | 天涯成人国产亚洲精品一区av| 欧美中文字幕亚洲一区二区va在线 | 狠狠色综合日日| 久久久久国产精品麻豆| 国产成人免费高清| 国产精品国产三级国产| 色综合久久天天| 亚洲超丰满肉感bbw| 91精品国产91久久综合桃花| 青青草国产精品亚洲专区无| 精品欧美一区二区久久| 国产福利91精品| 亚洲视频在线观看三级| 青青草原综合久久大伊人精品| 一区二区三区在线播| 色婷婷久久久综合中文字幕| 色狠狠桃花综合| 欧美一级理论性理论a| 国产女主播视频一区二区| 首页国产欧美久久| 久久综合九色综合欧美98| 国产成人一区在线| 亚洲欧洲精品一区二区三区| 91小视频在线| 久久99精品国产| 国产精品久久久久久久久免费桃花| 一本一道久久a久久精品综合蜜臀| 亚洲国产人成综合网站| 精品国产污污免费网站入口 |