New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expected behaviour of Mat::copyTo? #10064
Comments
Could you try to check with reverted patch #9551 ? |
It seems like #9551 isn't related to this bug. I found the bug in OpenCV as far back as 2.4.9 - however it would be great if someone else could double-check this. I used |
Check |
The build information looks great! I am indeed using v2.4.9.
|
@liquidmetal can i ask a favour unrelated to this issue. |
Expected output is black image 159 x 119 pixels. Destination image is re-allocated, but occasionally with the same memory location, so this code doesn't work properly:
|
This is great - thanks! |
System information (version)
Detailed description
Copying a small
Mat
to a largerMat
produces artifacts because of image reshaping.Expected output (120 rows, 160 cols)
Actual image saved using
imwrite
(119 rows, 159 cols)Steps to reproduce
Potential issue
memcpy
that isn't aligned correct. This is also likely to be some specialized CPU instruction.output_with_content
, larger) image to stay intact and the smaller image (to_paste
) to be pasted in the top-left corner of the image. Is this the expected behavior?Potential solutions
This can be solved in one of the following ways:
Mat
s to be the same dimension and error out if this isn't trueI'd be happy to contribute this fix (if this is something that needs fixing that is)
The text was updated successfully, but these errors were encountered: