Subversion Repositories seema-scanner

Rev

Rev 197 | Rev 206 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 197 Rev 198
Line 232... Line 232...
232
            // point to line distance
232
            // point to line distance
233
            dI[k] = cv::norm((point-p)-(point-p).dot(axis)*axis);
233
            dI[k] = cv::norm((point-p)-(point-p).dot(axis)*axis);
234
        }
234
        }
235
        float sum = std::accumulate(dI.begin(), dI.end(), 0.0);
235
        float sum = std::accumulate(dI.begin(), dI.end(), 0.0);
236
        float mean = sum / dI.size();
236
        float mean = sum / dI.size();
237
        float sumSqDev = 0;
237
        float meanDev = 0;
238
        for(int k=0; k<l; k++){
238
        for(int k=0; k<l; k++){
239
            sumSqDev += (dI[k] - mean)*(dI[k] - mean);
239
            meanDev += std::abs(dI[k] - mean);
240
        }
240
        }
241
        //meanDev /= l;
241
        meanDev /= l;
242
        //std::cout << meanDev << std::endl;
-
 
243
        error += sumSqDev;
242
        error += meanDev;
244
    }
243
    }
245
    //error /= mn;
244
    error /= mn;
246
}
245
}
247
 
246
 
248
void SMCalibrationWorker::performCalibration(std::vector<SMCalibrationSet> calibrationData){
247
void SMCalibrationWorker::performCalibration(std::vector<SMCalibrationSet> calibrationData){
249
 
248
 
250
    QSettings settings;
249
    QSettings settings;