calibration-toolbox icon indicating copy to clipboard operation
calibration-toolbox copied to clipboard

there are hard coded numbers in the code

Open shomedas opened this issue 7 years ago • 3 comments

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

shomedas avatar Oct 09 '17 11:10 shomedas

After modifying the code, did you run it successfully on your dataset?

dongshengLiu avatar Sep 16 '20 01:09 dongshengLiu

no. i moved on.

shomedas avatar Oct 08 '20 10:10 shomedas

@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.

prclibo avatar Oct 21 '20 07:10 prclibo