1 | initial version |
here's the culprit:
cvtColor(B, B, COLOR_BGR2GRAY);
you probably expected it to haqppen "in-place", but -- since the number of input/output pixels differ, the internal memory of B
is reallocated, and it's data pointer is no more the same as A
or C
in other words, all expected behaviour. (A and C still point to the very same memory)
2 | No.2 Revision |
here's the culprit:
cvtColor(B, B, COLOR_BGR2GRAY);
you probably expected it to haqppen happen "in-place", but -- since the number of input/output pixels differ, the internal memory of B
is reallocated, and it's data pointer is no more the same as A
or C
in other words, all expected behaviour. (A and C still point to the very same memory)