Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

because with test = ( A == B ); is a logical operation with uchar as result. This means that you can do simply

Mat test;
test = (A == B);
for (int r = 0; r < test.rows; r++)
{
    for (int c = 0; c < test.cols; c++)
    {
        cout << 1 * test.at<uchar>(r, c) << "\t";
    }
    cout << endl;
}