Fix Mat indexing in TrackingMotion tutorial code (supersedes pull request #38)

pull/29/merge
Andrey Kamaev 12 years ago
parent 304714862f
commit 83799d6bf4
  1. 4
      samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp

@ -55,8 +55,8 @@ int main( int argc, char** argv )
for( int j = 0; j < src_gray.rows; j++ )
{ for( int i = 0; i < src_gray.cols; i++ )
{
float lambda_1 = myHarris_dst.at<float>( j, i, 0 );
float lambda_2 = myHarris_dst.at<float>( j, i, 1 );
float lambda_1 = myHarris_dst.at<Vec6f>(j, i)[0];
float lambda_2 = myHarris_dst.at<Vec6f>(j, i)[1];
Mc.at<float>(j,i) = lambda_1*lambda_2 - 0.04*pow( ( lambda_1 + lambda_2 ), 2 );
}
}

Loading…
Cancel
Save