You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ransac_calibration.m
    path of file: ./repos/Stereo-Camera-Calibration-Orthogonal-Planes
    
    the code of the file until where you have to start completion: function [K R T]=ransac_calibration(Wpoints,Ipoints)


    
function [K R T]=ransac_calibration(Wpoints,Ipoints)

%% written by Muhammet Balcilar,France
%% muhammetbalcilar@gmail.com


% these are ransac parameters
% it refers the threshold value to determine which instance in inlier or outlier.
% it means if the dstance is bigger than this threshold we get it into account
% as outlier unless inlier
threshDist=2;
% it defines how many iteration we need to keep continue. normally given code gives
% us infinitive loop as define while 1, but in pratically we should keep
% loop with in certain number of loop
maxIter=5000;
% this define how many instance is inlier, we define as 0 for initial value
bestInNum=0;





% we set 2d and 3d points locations
Points3D= Wpoints;%nccworldPt(2:end