Hello , I want to use countNonZero , but I am getting a seg fault at the countNnZero line.
vector<Mat> mycompare;
int compareSize = (N / 2) * (N -1);
mycompare.resize( compareSize );
int myCounts [ compareSize ];
int index = 0;
for ( int idx = 0; idx < N; idx++ )
{
for ( int k = idx + 1; k < N; k ++ )
{
mycompare[ index++ ] = ( A[ idx ] == A[ k ] );
myCounts[ index++ ] = countNonZero( mycompare[ index ] );
}
}