mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
Fix Mat indexing in TrackingMotion tutorial code (supersedes pull request #38)
This commit is contained in:
parent
304714862f
commit
83799d6bf4
@ -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…
Reference in New Issue
Block a user