1 | initial version |
I guess you think that 'dst = src' and 'src = tmp' operations perform copy of image. But in fact they are not. This is just change of pointer and reference counter. If you want to copy the image itself you should use copyTo() function like you did with tmp image.