calibration-toolbox
calibration-toolbox copied to clipboard
there are hard coded numbers in the code
There are hard coded numbers in the code. I think this is the reason the code doesnt work with images or patterns other than the one in the demo folder. For example in cameraCalibrationBase.m
function obj = CameraCalibrationBase(width, height, pattern)
obj.pattern = pattern;
obj.photosInfo = [];
obj.camera = [];
obj.minMatchedPoints = max(15, 20 / 1000 * width);
obj.maxInitReprojectError = 20 / 1200 * width;
obj.maxFinalReprojectError = 1.5;
obj.maxInlierError = 1;
obj.maxSmoothError = 80 / 1000 * width;
obj.intrinsicsFile = [];
if ~isempty(pattern)
patternKeyPoints = detectSURFFeatures(obj.pattern, 'NumOctaves', 3, 'NumScaleLevels', 3);
[obj.patternFeatures, obj.patternPoints] = extractFeatures(obj.pattern, patternKeyPoints);
else
obj.patternFeatures = [];
obj.patternPoints = [];
end
end
After modifying the code, did you run it successfully on your dataset?
no. i moved on.
@shomedas These params are set to be propositional to the image size. So should be adaptable to data of different image size. Reprojection error are usually set to be constant pixels regardless of the image size in e.g. SLAM systems.