Subversion Repositories seema-scanner

Rev

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

Rev 228 Rev 229
Line 12... Line 12...
12
#include <math.h>
12
#include <math.h>
13
 
13
 
14
#include "cvtools.h"
14
#include "cvtools.h"
15
#include "algorithmtools.h"
15
#include "algorithmtools.h"
16
 
16
 
17
#define SM_DEBUG 1
-
 
18
 
-
 
19
static unsigned int nStepsPrimary = 16; // number of shifts/steps in primary
17
static unsigned int nStepsPrimary = 16; // number of shifts/steps in primary
20
static unsigned int nStepsSecondary = 8; // number of shifts/steps in secondary
18
static unsigned int nStepsSecondary = 8; // number of shifts/steps in secondary
21
static float nPeriodsPrimary = 40; // primary period
19
static float nPeriodsPrimary = 40; // primary period
22
 
20
 
23
AlgorithmPhaseShiftTwoFreq::AlgorithmPhaseShiftTwoFreq(unsigned int _screenCols, unsigned int _screenRows) : Algorithm(_screenCols, _screenRows){
21
AlgorithmPhaseShiftTwoFreq::AlgorithmPhaseShiftTwoFreq(unsigned int _screenCols, unsigned int _screenRows) : Algorithm(_screenCols, _screenRows){
Line 304... Line 302...
304
    #ifdef SM_DEBUG
302
    #ifdef SM_DEBUG
305
        cvtools::writeMat(color0, "color0.mat", "color0");
303
        cvtools::writeMat(color0, "color0.mat", "color0");
306
        cvtools::writeMat(color1, "color1.mat", "color1");
304
        cvtools::writeMat(color1, "color1.mat", "color1");
307
    #endif
305
    #endif
308
 
306
 
309
        // Retrieve color information
307
    // Retrieve color information
310
    color.resize(nMatches);
308
    color.resize(nMatches);
311
    for(int i=0; i<nMatches; i++){
309
    for(int i=0; i<nMatches; i++){
312
 
310
 
313
        cv::Vec3b c0 = color0.at<cv::Vec3b>(q0[i][1], q0[i][0]);
311
        cv::Vec3b c0 = color0.at<cv::Vec3b>(q0[i][1], q0[i][0]);
314
        cv::Vec3b c1 = color1.at<cv::Vec3b>(q1[i][1], q1[i][0]);
312
        cv::Vec3b c1 = color1.at<cv::Vec3b>(q1[i][1], q1[i][0]);